Members of the KDE Community are recommended to subscribe to the kde-community mailing list at to allow them to participate in important discussions and receive other important announcements

Commit 98459b79 authored by Huon Imberger's avatar Huon Imberger Committed by Henrik Fehlauer

Replace manual palette adjustment with background role (fullscreen info label)

Instead of customising the palette, then monitoring for changes, we set the background color role of the widget.

This has the benefit of keeping the palette inherited, therefore changes to the system palette still propogate. Not to mention we don't need to watch for palette change events.

Test Plan: The information label in fullscreen (where the filename is displayed) should not significantly change color. A slight change is expected as we are not manually setting it but using a pre-determined role.

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Differential Revision:
parent f87cd4b9
......@@ -129,7 +129,6 @@ void FullScreenContent::init(KActionCollection* actionCollection, QWidget* autoH
mContent->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed);
EventWatcher::install(mContent, QEvent::Show, this, SLOT(updateCurrentUrlWidgets()));
EventWatcher::install(mContent, QEvent::PaletteChange, this, SLOT(slotPaletteChanged()));
......@@ -156,6 +155,7 @@ void FullScreenContent::init(KActionCollection* actionCollection, QWidget* autoH
mInformationLabel->setContentsMargins(6, 0, 6, 0);
mInformationLabel->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
mInformationLabelShadow = new ShadowFilter(mInformationLabel);
// Thumbnail bar
......@@ -219,13 +219,6 @@ void FullScreenContent::updateInformationLabel()
void FullScreenContent::slotPaletteChanged()
QPalette pal = mContent->palette();
pal.setColor(QPalette::Window, pal.color(QPalette::Window).dark(110));
void FullScreenContent::updateCurrentUrlWidgets()
......@@ -84,7 +84,6 @@ private Q_SLOTS:
void updateInformationLabel();
void updateMetaInfoDialog();
void showImageMetaInfoDialog();
void slotPaletteChanged();
void slotImageMetaInfoDialogClosed();
void slotPreferredMetaInfoKeyListChanged(const QStringList& list);
void showOptionsMenu();
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