Commit f4e854ae authored by Janet Blackquill's avatar Janet Blackquill 🌈 Committed by Nate Graham
Browse files

[kstyle]: Don't draw line when no toolbars are present in fullscreen

Since there's no titlebar to draw a separator under, a separator just looks strange.

BUG: 431969


(cherry picked from commit c3e2d0b7)
parent 861c5c92
......@@ -965,7 +965,7 @@ namespace Breeze
auto rect = _toolsAreaManager->toolsAreaRect(mw);
if (rect.height() == 0) {
if (mw->property(PropertyNames::noSeparator).toBool()) {
if (mw->property(PropertyNames::noSeparator).toBool() || mw->isFullScreen()) {
painter->restore();
return true;
}
......@@ -986,6 +986,9 @@ namespace Breeze
painter->restore();
} else if (auto dialog = qobject_cast<const QDialog*>(widget)) {
if (dialog->isFullScreen()) {
return true;
}
painter->setPen(QPen(_helper->separatorColor(_toolsAreaManager->palette()), PenWidth::Frame * widget->devicePixelRatio()));
painter->drawLine(widget->rect().topLeft(), widget->rect().topRight());
}
......
......@@ -64,7 +64,7 @@ namespace Breeze {
}
}
if (itemHeight == 0 && !(window->property(PropertyNames::noSeparator).toBool())) {
if (itemHeight == 0 && !(window->property(PropertyNames::noSeparator).toBool()) && !window->isFullScreen()) {
auto win = const_cast<QMainWindow*>(window);
win->setContentsMargins(0, 1, 0, 0);
} else {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment