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

Elvis Angelaccio noreply at phabricator.kde.org
Wed Oct 24 17:47:11 BST 2018


elvisangelaccio added inline comments.

INLINE COMMENTS

> statusbarspaceinfo.cpp:111
> +        QPalette p = palette();
> +        KColorScheme colorScheme(QPalette::Active, KColorScheme::Selection);
> +        

Why `KColorScheme::Selection` ? That should be used for items that can be selected.

We should probably use `KColorScheme::Window` instead

> statusbarspaceinfo.cpp:114
> +        if (percentUsed >= 90) {
> +            p.setBrush(QPalette::Highlight, colorScheme.background(KColorScheme::NegativeBackground));
> +            p.setBrush(QPalette::HighlightedText, colorScheme.foreground(KColorScheme::NegativeText));

Why `QPalette::Highlight` ? That's supposed to be used for the selected text's color

> statusbarspaceinfo.cpp:115
> +            p.setBrush(QPalette::Highlight, colorScheme.background(KColorScheme::NegativeBackground));
> +            p.setBrush(QPalette::HighlightedText, colorScheme.foreground(KColorScheme::NegativeText));
> +        } else {

What's the second `setBrush()` needed for?

REPOSITORY
  R318 Dolphin

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

To: sourabhboss, ngraham, pino, elvisangelaccio, #dolphin
Cc: cfeck, kfm-devel, sourabhboss, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20181024/bf5d784c/attachment.htm>


More information about the kfm-devel mailing list