D15093: Add WireGuard capability.

Bruce Anderson noreply at phabricator.kde.org
Thu Oct 18 11:20:11 BST 2018


andersonbruce added inline comments.

INLINE COMMENTS

> jgrulich wrote in wireguardwidget.cpp:60
> Do not use KColorScheme. Use QPalette instead and you don't need to keeping it as class variable.

My apologies if I sound a little frustrated on this but I spent more than 4 hours trying to follow the very unclear documentation on handling colors before making this change. I thought the whole idea was that I was supposed to use the scheme the user picked to tell what color to make the background when it wasn't valid rather than assigning an arbitrary color.  KColorScheme allows you to do this using the "NegativeBackground" role but there doesn't appear to be any corresponding concept using QPalette. What would you suggest that I use as the background for invalid entries? Or better yet. do you know of an example of something that uses QPalette in a similar context since I have been unable to find one?

As far as putting it in a class variable, I only did that so that I wouldn't be creating them each time I wanted to change a background on one of the widgets and to be able to pass them to the advanced widget and not have to create them there as well. If you think that  palette creation is a relatively time efficient process, I'll just create them on the stack in the setBackground() function each time they are needed.

REPOSITORY
  R116 Plasma Network Management Applet

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

To: andersonbruce, #plasma, jgrulich, pino
Cc: acrouthamel, K900, pino, lbeltrame, ngraham, plasma-devel, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20181018/c98cce62/attachment-0001.html>


More information about the Plasma-devel mailing list