D16353: Change color(NegativeBackground) of status bar in space info when storage exceeds 90%

Christoph Feck noreply at phabricator.kde.org
Tue Feb 18 23:30:30 GMT 2020


cfeck added a comment.


  Sorry, it is still wrong. QPalette and KColorScheme have a fixed set of compatible "bg + fg" colors.
  
  For QPalette:
  
  - Base/AlternateBase + Text
  - Window + WindowText
  - Button + ButtonText
  - Highlight + HighlightedText
  - ToolTipBase + ToolTipText
  
  (note that Background + Foreground is an obsolete way to express Window + WindowText)
  
  For KF5, there are many more compatible combinations. Basically, for each "set" of colors (View, Window, Button, Selection, ToolTip, which map to the QPalette backgrounds above), there are many separate background roles and matching foreground/text roles.
  
  So the statement `palette.setBrush(QPalette::Highlight, colorScheme.foreground(KColorScheme::ActiveText))` is wrong, because you are trying to set a fg/text color as a background color. Same for `palette.setBrush(QPalette::Background, colorScheme.foreground(KColorScheme::NegativeText))`.

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D16353

To: meven, ngraham, pino, elvisangelaccio, #dolphin, sourabhboss
Cc: meven, cfeck, kfm-devel, pberestov, iasensio, fprice, MrPepe, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, ngraham, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200218/908e5284/attachment.htm>


More information about the kfm-devel mailing list