Skip to content
  • rk flx's avatar
    Fix icon colors of inline context buttons also in full screen mode · 46e95531
    rk flx authored
    Summary:
    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 simply use `QIcon::fromTheme` instead of `SmallIcon`,
    which returns a proper `QIcon` instead of a `QPixmap` and automatically
    adapts to colour palette changes.
    
    (This is a followup patch to D7988.)
    
    CCBUG: 383059
    FIXED-IN: 17.08.2
    
    Test Plan:
    Overlay icons perfectly visible against the background color in standard
    and full screen mode. Tested with "Breeze" and "Breeze Dark" colour
    schemes as well as "Breeze", "Oxygen" and "Fusion" widget styles.
    ("Fusion" does not allow to customize the size for small icons, though.)
    
    Reviewers: #kde_applications, broulik, ngraham
    
    Reviewed By: broulik
    
    Differential Revision: https://phabricator.kde.org/D8031
    46e95531