Commit cb52d001 authored by Jan Blackquill's avatar Jan Blackquill 🌈 Committed by Jan Blackquill

[kstyle]: Add option to allow applications to opt out of a border being drawn...

[kstyle]: Add option to allow applications to opt out of a border being drawn on main windows when there are no toolbars
parent 9439013d
......@@ -18,5 +18,6 @@ namespace Breeze
const char PropertyNames::menuTitle[] = "_breeze_toolButton_menutitle";
const char PropertyNames::alteredBackground[] = "_breeze_altered_background";
const char PropertyNames::highlightNeutral[] = "_kde_highlight_neutral";
const char PropertyNames::noSeparator[] = "_breeze_no_separator";
}
......@@ -21,6 +21,7 @@ namespace Breeze
static const char menuTitle[];
static const char alteredBackground[];
static const char highlightNeutral[];
static const char noSeparator[];
};
}
......
......@@ -926,6 +926,10 @@ namespace Breeze
auto rect = _toolsAreaManager->toolsAreaRect(mw);
if (rect.height() == 0) {
if (mw->property(PropertyNames::noSeparator).toBool()) {
painter->restore();
return true;
}
painter->setPen(QPen(_helper->separatorColor(_toolsAreaManager->palette()), PenWidth::Frame * widget->devicePixelRatio()));
painter->drawLine(widget->rect().topLeft(), widget->rect().topRight());
painter->restore();
......
#include "breezetoolsareamanager.h"
#include "breezepropertynames.h"
#include <QMainWindow>
#include <QMdiArea>
......@@ -63,7 +64,7 @@ namespace Breeze {
}
}
if (itemHeight == 0) {
if (itemHeight == 0 && !window->property(PropertyNames::noSeparator) {
auto win = const_cast<QMainWindow*>(window);
win->setContentsMargins(0, 1, 0, 0);
} else {
......
Markdown is supported
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