Commit 4127b5f2 authored by Nate Graham's avatar Nate Graham
Browse files

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

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

This reverts commit ef234aca.

CCMAIL: uhhadd@gmail.com
CCMAIL: kde@david-redondo.de

This commit was inappropriately reverted with no discussion for the
second time, ignoring the comment recommending against it in
!82 (comment 190308).

This is a community project and you are not the maintainer. Please do
not revert this again, and also stop reverting changes you disapprove
of without discussion. This is an inappropruate use of your commit
rights and may result in their revocation if you keep doing it.

Further offenses will be reported to the CWG.
parent ef234aca
......@@ -950,7 +950,7 @@ namespace Breeze
bool Style::drawWidgetPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const {
Q_UNUSED(option)
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 {
_windows[mainWindow].removeAll(toolbar);
}
}
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();
};
}
......
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