Skip to content
Commit 3f540441 authored by Huon Imberger's avatar Huon Imberger
Browse files

Fix dark HUD icons when using light system theme

Summary:
The HUD widgets are custom and always dark themed. When using a light
system theme like Breeze, the icons were rendered with a dark color,
which was bad because it didn't contrast with the dark HUD. This was
not an issue in full screen mode, because we force the whole of
Gwenview to use a dark theme, and therefore the icons rendered a light
color.

This affects:
  # Compare / Light table mode
  # Video controls popup
  # The "You are now viewing the new document" message after Save As

(Other places the HUD is used do not use icons)

So, when setting an icon using `HudButton::setIcon`, this patch now
re-loads the icon using the `KIconLoader` global instance, setting a
custom palette with a white foreground color, so the loader loads a
light icon. `KIconLoader`'s palette is then reset as to not interfere
with other icons.

BUG: 380257
FIXED-IN: 18.08.0

Note: we bump KF5 version to 5.39 for `KIconLoader::setCustomPalette`
and `KIconLoader::resetPalette`.

Compare/Lighttable Before:
{F5826780, size=full}

Compare/Lighttable After:
{F5826781, size=full}

Video Controls Before:
{F5826782, size=full}

Video Controls After:
{F5826783, size=full}

Save As message Before:
{F5826784, size=full}

Save As message After:
{F5826809, size=full}

Test Plan:
The following have HUD widgets with icons:
  # Compare / Light table mode
  # Video controls popup
  # The "You are now viewing the new document" message after Save As

Note for 3), the HUD only appears for a split second, due to a bug. See
D9342.

Reviewers: #gwenview, rkflx

Reviewed By: #gwenview, rkflx

Subscribers: muhlenpfordt

Tags: #gwenview

Differential Revision: https://phabricator.kde.org/D12595
parent c7b70617
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