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

This reverts commit ce4e031fc7.

This has been annoying when debugging the tools area, and also causes
many colour schemes that would look good with a tools area border to not
draw one. The cases where this commit improves on are far outweighed by
the ones where this commit causes a visual regression.
wilder-5.24
Carson Black 5 years ago committed by Jan Blackquill
parent 27b4232257
commit 9f40b17e57
  1. 2
      kstyle/breezestyle.cpp
  2. 7
      kstyle/breezetoolsareamanager.cpp
  3. 3
      kstyle/breezetoolsareamanager.h

@ -955,7 +955,7 @@ namespace Breeze
bool Style::drawWidgetPrimitive( const QStyleOption* option, QPainter* painter, const QWidget* widget ) const {
Q_UNUSED(option)
auto parent = widget;
if (!_toolsAreaManager->hasHeaderColors() || !_helper->shouldDrawToolsArea(widget)) {
if (!_helper->shouldDrawToolsArea(widget)) {
return true;
}
auto mw = qobject_cast<const QMainWindow*>(widget);

@ -126,8 +126,6 @@ namespace Breeze {
}
}
}
_colorSchemeHasHeaderColor = KColorScheme::isColorSetSupported(_config, KColorScheme::Header);
}
bool AppListener::eventFilter(QObject *watched, QEvent *event)
@ -246,9 +244,4 @@ namespace Breeze {
_windows[mainWindow].removeAll(toolbar);
}
}
bool Breeze::ToolsAreaManager::hasHeaderColors()
{
return _colorSchemeHasHeaderColor;
}
}

@ -36,7 +36,6 @@ namespace Breeze {
KConfigWatcher::Ptr _watcher;
QPalette _palette = QPalette();
AppListener* _listener;
bool _colorSchemeHasHeaderColor;
friend class AppListener;
@ -58,8 +57,6 @@ namespace Breeze {
void unregisterWidget(QWidget *widget);
QRect toolsAreaRect(const QMainWindow *window);
bool hasHeaderColors();
};
}

Loading…
Cancel
Save