Commit 3685a167 authored by Nate Graham's avatar Nate Graham
Browse files

Revert "Revert "Do not draw background or line in toolbars if the color scheme...

Revert "Revert "Do not draw background or line in toolbars if the color scheme has no headers group""

This reverts commit 9f40b17e.

The idea of a Tools Area separator only makes sense when there is a unibody
Tools Area. When using a color scheme without Header colors, there is no
Tools Area (just a disparate collection of titlebars, manubars, and
toolbars), so the line is just extra visual noise that various people
have objected to following the Plasma 5.21 release. Let's make it
conditional on using a color scheme with Header colors again.

BUG: 433118
FIXED-IN: 5.21.1

(cherry picked from commit 2f1fc86a)
parent a3d11055
......@@ -950,7 +950,7 @@ namespace Breeze
bool Style::drawWidgetPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const {
auto parent = widget;
if (!_helper->shouldDrawToolsArea(widget)) {
if (!_toolsAreaManager->hasHeaderColors() || !_helper->shouldDrawToolsArea(widget)) {
return true;
auto mw = qobject_cast<const QMainWindow*>(widget);
......@@ -121,6 +121,8 @@ namespace Breeze {
_colorSchemeHasHeaderColor = KColorScheme::isColorSetSupported(_config, KColorScheme::Header);
bool AppListener::eventFilter(QObject *watched, QEvent *event)
......@@ -239,4 +241,9 @@ namespace Breeze {
bool Breeze::ToolsAreaManager::hasHeaderColors()
return _colorSchemeHasHeaderColor;
......@@ -37,6 +37,7 @@ namespace Breeze {
KConfigWatcher::Ptr _watcher;
QPalette _palette = QPalette();
AppListener* _listener;
bool _colorSchemeHasHeaderColor;
friend class AppListener;
......@@ -58,6 +59,8 @@ namespace Breeze {
void unregisterWidget(QWidget *widget);
QRect toolsAreaRect(const QMainWindow *window);
bool hasHeaderColors();
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