In the darker full screen mode, the icons of the mouse-over overlays
were still hard to see against the similarly coloured background. This
was because when switching to full screen mode, we would miss to reset
the icon (except for `mToggleSelectionButton`). The root cause is
`QAbstractButton`, which just holds onto a pixmap and has no way of
knowing `KIconLoader` would return a differently coloured icon when the
colour palette changes (as is the case for colour-aware icon sets like
"Breeze").
To fix this, we remember the icon name to be able to reset the icon when
a `PaletteChange` event occurs.
As we now need the `ContextBarButton` again, we have to revertsimply use `QIcon::fromTheme` instead of `SmallIcon`,
b09b216fe7b4. Still, fixing the original problem is achieved bywhich returns a proper `QIcon` instead of a `QPixmap` and automatically
delegating the painting to `QToolButton`adapts to colour palette changes.
Note:
I debated whether to keep the custom painting code, after all Aurélien
put a lot of effort in customizing the look and probably had his reasons
for doing so. However, in the end I decided against it: Nowadays
Breeze's icons are mostly monochrome, making them hard to see on
similarly coloured backgrounds. By simply using the standard
`QToolButton` painting code without `autoRaise`, we get a suitable
background colour for free, as well as the nice mouse-over animations of(This is a followup patch to D7988.)
CCBUG: 383059
the Breeze style. This also reduces the future maintenance burden.
CCBUG: 383059FIXED-IN: 17.08.2