Skip to content

Commit

Permalink
Revert "Revert "Revert "Revert "Do not draw background or line in too…
Browse files Browse the repository at this point in the history
…lbars if the color scheme has no headers group""""

This reverts commit ef234ac.

CCMAIL: [email protected]
CCMAIL: [email protected]

This commit was inappropriately reverted with no discussion for the
second time, ignoring the comment recommending against it in
https://invent.kde.org/plasma/breeze/-/merge_requests/82#note_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.
  • Loading branch information
Pointedstick committed Feb 23, 2021
1 parent 925d4b4 commit 9c21c8b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kstyle/breezestyle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
7 changes: 7 additions & 0 deletions kstyle/breezetoolsareamanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ namespace Breeze {
}
}
}

_colorSchemeHasHeaderColor = KColorScheme::isColorSetSupported(_config, KColorScheme::Header);
}

bool AppListener::eventFilter(QObject *watched, QEvent *event)
Expand Down Expand Up @@ -239,4 +241,9 @@ namespace Breeze {
_windows[mainWindow].removeAll(toolbar);
}
}

bool Breeze::ToolsAreaManager::hasHeaderColors()
{
return _colorSchemeHasHeaderColor;
}
}
3 changes: 3 additions & 0 deletions kstyle/breezetoolsareamanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ namespace Breeze {
KConfigWatcher::Ptr _watcher;
QPalette _palette = QPalette();
AppListener* _listener;
bool _colorSchemeHasHeaderColor;

friend class AppListener;

Expand All @@ -58,6 +59,8 @@ namespace Breeze {
void unregisterWidget(QWidget *widget);

QRect toolsAreaRect(const QMainWindow *window);

bool hasHeaderColors();
};
}

Expand Down

0 comments on commit 9c21c8b

Please sign in to comment.