[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: Review Request 110701: Make the notes plasmoid change the background color according to the curr
From: "Aaron J. Seigo" <aseigo () kde ! org>
Date: 2013-06-21 9:02:20
Message-ID: 20130621090220.15321.36253 () vidsolbach ! de
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
> On June 20, 2013, 2:59 p.m., Aaron J. Seigo wrote:
> >
>
> Wolfgang Bauer wrote:
> Thank you!
>
> But this somehow depends on https://git.reviewboard.kde.org/r/110716/ because the \
> same text color should be used everywhere (either Plasma::Theme::TextColor or \
> Plasma::Theme::ButtonTextColor). Could you have a look at that review request as \
> well, please?
ok, 117016 is good to go as well
- Aaron J.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/110701/#review34778
-----------------------------------------------------------
On June 20, 2013, 6:12 p.m., Wolfgang Bauer wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/110701/
> -----------------------------------------------------------
>
> (Updated June 20, 2013, 6:12 p.m.)
>
>
> Review request for Plasma and Anne-Marie Mahfouf.
>
>
> Description
> -------
>
> The notes plasmoid by default takes the text color from the current plasma theme \
> but has "yellow" hardcoded as default background color. This can lead to unreadable \
> notes by default with certain plasma themes, e.g. Produkt. It's especially annoying \
> if you're using such a theme because you can't globally change the default notes \
> colors but have to do it for each note on its own (f.e. every time after pasting \
> text to the desktop by pressing the middle mouse button).
> This patch changes the default background color to black if the text color is \
> brighter than a certain threshold. Also the background color is re-read from the \
> config on plasma theme change to make it change as well if necessary.
> The brightness is determined with QColor::lightness().
> I chose 100 as threshold, because yellow's lightness value is 128 and yellow on \
> yellow wouldn't be good either... ;-) I don't know if 100 is the perfect value, but \
> it works as intended with all the themes I have installed.
>
> This addresses bug 320350.
> http://bugs.kde.org/show_bug.cgi?id=320350
>
>
> Diffs
> -----
>
> applets/notes/notes.cpp 5c2ed70
>
> Diff: http://git.reviewboard.kde.org/r/110701/diff/
>
>
> Testing
> -------
>
> Created a note on the desktop (with default text and background color) and switched \
> the plasma theme to each one I have installed. (Air, Air for Netbooks, Air \
> openSUSE, Androbit, Aya, Produkt, Slim Glow, Tibanna, openSUSE) Notes were readable \
> with any theme, the background color changed to black where necessary, was yellow \
> as before otherwise.
> This patch is also part of openSUSE's plasma-addons package since a month ago.
>
>
> File Attachments
> ----------------
>
> Note in Produkt theme without this patch
> http://git.reviewboard.kde.org/media/uploaded/files/2013/06/20/notes_Produkt_without_patch.png
> Note in Produkt theme with this patch
> http://git.reviewboard.kde.org/media/uploaded/files/2013/06/20/notes_Produkt_with_patch.png
>
>
> Thanks,
>
> Wolfgang Bauer
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/110701/">http://git.reviewboard.kde.org/r/110701/</a>
</td>
</tr>
</table>
<br />
<p>On June 20th, 2013, 6:17 p.m. UTC, <b>Wolfgang Bauer</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;"> <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Thank you!
But this somehow depends on https://git.reviewboard.kde.org/r/110716/ because the \
same text color should be used everywhere (either Plasma::Theme::TextColor or \
Plasma::Theme::ButtonTextColor). Could you have a look at that review request as \
well, please?</pre> </blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">ok, 117016 is good to go \
as well</pre> <br />
<p>- Aaron J.</p>
<br />
<p>On June 20th, 2013, 6:12 p.m. UTC, Wolfgang Bauer wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for Plasma and Anne-Marie Mahfouf.</div>
<div>By Wolfgang Bauer.</div>
<p style="color: grey;"><i>Updated June 20, 2013, 6:12 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">The notes plasmoid by default takes the text color from the current \
plasma theme but has "yellow" hardcoded as default background color. This \
can lead to unreadable notes by default with certain plasma themes, e.g. Produkt. \
It's especially annoying if you're using such a theme because you can't \
globally change the default notes colors but have to do it for each note on its own \
(f.e. every time after pasting text to the desktop by pressing the middle mouse \
button).
This patch changes the default background color to black if the text color is \
brighter than a certain threshold. Also the background color is re-read from the \
config on plasma theme change to make it change as well if necessary.
The brightness is determined with QColor::lightness().
I chose 100 as threshold, because yellow's lightness value is 128 and yellow on \
yellow wouldn't be good either... ;-) I don't know if 100 is the perfect \
value, but it works as intended with all the themes I have installed.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Created a note on the desktop (with default text and background color) \
and switched the plasma theme to each one I have installed. (Air, Air for Netbooks, \
Air openSUSE, Androbit, Aya, Produkt, Slim Glow, Tibanna, openSUSE) Notes were \
readable with any theme, the background color changed to black where necessary, was \
yellow as before otherwise.
This patch is also part of openSUSE's plasma-addons package since a month \
ago.</pre> </td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=320350">320350</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>applets/notes/notes.cpp <span style="color: grey">(5c2ed70)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/110701/diff/" style="margin-left: \
3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>
<ul>
<li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/06/20/notes_Produkt_without_patch.png">Note \
in Produkt theme without this patch</a></li>
<li><a href="http://git.reviewboard.kde.org/media/uploaded/files/2013/06/20/notes_Produkt_with_patch.png">Note \
in Produkt theme with this patch</a></li>
</ul>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic