diff options
Diffstat (limited to 'src/gui/styles')
-rw-r--r-- | src/gui/styles/qstylesheetstyle.cpp | 10 | ||||
-rw-r--r-- | src/gui/styles/qstylesheetstyle_p.h | 2 |
2 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp index 5756dba..f480008 100644 --- a/src/gui/styles/qstylesheetstyle.cpp +++ b/src/gui/styles/qstylesheetstyle.cpp @@ -5872,13 +5872,11 @@ void QStyleSheetStyle::clearWidgetFont(QWidget* w) const w->setProperty("_q_styleSheetWidgetFont", QVariant(QVariant::Invalid)); } -// Returns the palette that should be used when the particular widget is focused. -// This needs to be called by some widgets that do drawing themselves instead -// of through the style. -// ### This should be removed ideally by Qt 4.5, and at least by Qt 5, and fixed -// for good by letting the style draw everything. +// Polish palette that should be used for a particular widget, with particular states +// (eg. :focus, :hover, ...) +// this is called by widgets that paint themself in their paint event // Returns true if there is a new palette in pal. -bool QStyleSheetStyle::focusPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal) +bool QStyleSheetStyle::styleSheetPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal) { if (!w || !opt || !pal) return false; diff --git a/src/gui/styles/qstylesheetstyle_p.h b/src/gui/styles/qstylesheetstyle_p.h index 1f61445..e057274 100644 --- a/src/gui/styles/qstylesheetstyle_p.h +++ b/src/gui/styles/qstylesheetstyle_p.h @@ -131,7 +131,7 @@ public: void saveWidgetFont(QWidget* w, const QFont& font) const; void clearWidgetFont(QWidget* w) const; - bool focusPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal); + bool styleSheetPalette(const QWidget* w, const QStyleOption* opt, QPalette* pal); protected Q_SLOTS: QIcon standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt = 0, |