[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-frameworks-devel
Subject:    Re: Review Request 127779: use system colors for monochrome icons
From:       Sebastian_Kügler <sebas () kde ! org>
Date:       2016-05-02 13:17:14
Message-ID: 20160502131714.17946.5793 () mimi ! kde ! org
[Download RAW message or body]

--===============2764145697219099763==
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127779/#review95076
-----------------------------------------------------------




autotests/kiconloader_unittest.cpp (line 441)
<https://git.reviewboard.kde.org/r/127779/#comment64522>

    Has the image been recolored to red ...
    
    (word order makes it easier to read)



src/kiconloader.cpp (line 290)
<https://git.reviewboard.kde.org/r/127779/#comment64524>

    If the icon is an SVG file, ...



src/kiconloader.cpp (line 292)
<https://git.reviewboard.kde.org/r/127779/#comment64523>

    text (lower case), perhaps @see the colors that are available?



src/kiconloader.cpp (line 869)
<https://git.reviewboard.kde.org/r/127779/#comment64525>

    Where does this one get deleted?


- Sebastian Kügler


On April 29, 2016, 9:25 a.m., Marco Martin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127779/
> -----------------------------------------------------------
> 
> (Updated April 29, 2016, 9:25 a.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: kiconthemes
> 
> 
> Description
> -------
> 
> Breeze uses stylesheet information to color its icons with some "named" colors that \
> change depending from the current system color scheme, this is already used since \
> some time in the icons used by the Plasma shell. But QWidget applications have the \
> same problem, when the user changes the color scheme from breeze to breeze dark (or \
> any color scheme), most of the icons will be black on black. This patch clones (a \
> bit simplified and taking only the most "important" colors) the logic used by \
> Plasma::Svg to color icons with the stylesheet. 
> even tough it's doing more things at icon generation, an application that uses a \
> lot of icons like Dolphin doesn't seem to have noticeable startup time difference, \
> even when the image cache is not present yet, so i hope is not an unacceptable \
> performance tradeoff (successive loads are unchanged as are from the image cache). 
> still some questions and things that can be optimized, like
> 
> * an optional key in the theme metadata file to explicitly enable this, to not have \
> it running in themes that don't care? 
> * can i use karchive in this framework?, so it would work with svgz icons as well
> 
> * right now to refresh icons at runtime it depends from a patch in the colors kcm \
> to emit iconchanges as well, alternatively kiconloader could watch for kcolorscheme \
> changes as well, but i don't think is strictly necessary 
> 
> Diffs
> -----
> 
> CMakeLists.txt 2e838e8 
> autotests/coloredsvgicon.svg PRE-CREATION 
> autotests/kiconloader_unittest.cpp 0e47cc8 
> autotests/resources.qrc a19c963 
> src/CMakeLists.txt 0e30a35 
> src/kiconloader.cpp 75ab482 
> src/kicontheme.h 3190665 
> src/kicontheme.cpp 0996054 
> 
> Diff: https://git.reviewboard.kde.org/r/127779/diff/
> 
> 
> Testing
> -------
> 
> 
> File Attachments
> ----------------
> 
> dadel1.png
> https://git.reviewboard.kde.org/media/uploaded/files/2016/04/28/0fc42425-947c-479e-9759-09c7a703a456__dadel1.png
>  
> 
> Thanks,
> 
> Marco Martin
> 
> 


--===============2764145697219099763==
MIME-Version: 1.0
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit




<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 \
solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">  \
<tr>  <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/127779/">https://git.reviewboard.kde.org/r/127779/</a>
  </td>
    </tr>
   </table>
   <br />











<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/127779/diff/9/?file=461526#file461526line441" \
style="color: black; font-weight: bold; text-decoration: \
underline;">autotests/kiconloader_unittest.cpp</a>  <span style="font-weight: \
normal;">

     (Diff revision 9)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">441</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="c1">//Has been the image been recolored to red,</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Has \
the image been recolored to red ...</p> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">(word order makes it \
easier to read)</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/127779/diff/9/?file=461529#file461529line290" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kiconloader.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 9)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">290</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cm">     * If the icon that&#39;s to be rendered is an svg file, process it \
generating a stylesheet</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">If \
the icon is an SVG file, ...</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/127779/diff/9/?file=461529#file461529line292" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kiconloader.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 9)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">292</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="cm">     * as Text color, background color, highlight color, \
positive/neutral/negative color</span></pre></td>  </tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">text \
(lower case), perhaps @see the colors that are available?</p></pre>  </div>
</div>
<br />

<div>



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;">  <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;">  <a \
href="https://git.reviewboard.kde.org/r/127779/diff/9/?file=461529#file461529line869" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/kiconloader.cpp</a>  <span style="font-weight: normal;">

     (Diff revision 9)

    </span>
   </th>
  </tr>
 </thead>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th>  <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>  <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">869</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">        <span \
class="n">reader</span><span class="p">.</span><span class="n">reset</span><span \
class="p">(</span><span class="k">new</span> <span class="n">QImageReader</span><span \
class="p">(</span><span class="n">path</span><span class="p">));</span></pre></td>  \
</tr>

 </tbody>

</table>

 <div style="margin-left: 2em;">

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">Where \
does this one get deleted?</p></pre>  </div>
</div>
<br />



<p>- Sebastian Kügler</p>


<br />
<p>On April 29th, 2016, 9:25 a.m. UTC, Marco Martin wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: \
1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; \
-webkit-border-radius: 6px;">  <tr>
  <td>

<div>Review request for KDE Frameworks and Plasma.</div>
<div>By Marco Martin.</div>


<p style="color: grey;"><i>Updated April 29, 2016, 9:25 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kiconthemes
</div>


<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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">Breeze uses stylesheet information to color its icons \
with some "named" colors that change depending from the current system color scheme, \
this is already used since some time in the icons used by the Plasma shell. But \
QWidget applications have the same problem, when the user changes the color scheme \
from breeze to breeze dark (or any color scheme), most of the icons will be black on \
black. This patch clones (a bit simplified and taking only the most "important" \
colors) the logic used by Plasma::Svg to color icons with the stylesheet.</p> <p \
style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">even tough it's doing more things at icon generation, an application that \
uses a lot of icons like Dolphin doesn't seem to have noticeable startup time \
difference, even when the image cache is not present yet, so i hope is not an \
unacceptable performance tradeoff (successive loads are unchanged as are from the \
image cache).</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">still some questions and things that can be optimized, \
like</p> <ul style="padding: 0;text-rendering: inherit;margin: 0 0 0 1em;line-height: \
inherit;white-space: normal;"> <li style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: normal;"> <p style="padding: 0;text-rendering: \
inherit;margin: 0;line-height: inherit;white-space: inherit;">an optional key in the \
theme metadata file to explicitly enable this, to not have it running in themes that \
don't care?</p> </li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">can i use karchive in this framework?, \
so it would work with svgz icons as well</p> </li>
<li style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: normal;"> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">right now to refresh icons at runtime \
it depends from a patch in the colors kcm to emit iconchanges as well, alternatively \
kiconloader could watch for kcolorscheme changes as well, but i don't think is \
strictly necessary</p> </li>
</ul></pre>
  </td>
 </tr>
</table>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>CMakeLists.txt <span style="color: grey">(2e838e8)</span></li>

 <li>autotests/coloredsvgicon.svg <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>autotests/kiconloader_unittest.cpp <span style="color: \
grey">(0e47cc8)</span></li>

 <li>autotests/resources.qrc <span style="color: grey">(a19c963)</span></li>

 <li>src/CMakeLists.txt <span style="color: grey">(0e30a35)</span></li>

 <li>src/kiconloader.cpp <span style="color: grey">(75ab482)</span></li>

 <li>src/kicontheme.h <span style="color: grey">(3190665)</span></li>

 <li>src/kicontheme.cpp <span style="color: grey">(0996054)</span></li>

</ul>

<p><a href="https://git.reviewboard.kde.org/r/127779/diff/" style="margin-left: \
3em;">View Diff</a></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">File Attachments \
</h1>


 <li><a href="https://git.reviewboard.kde.org/media/uploaded/files/2016/04/28/0fc42425-947c-479e-9759-09c7a703a456__dadel1.png">dadel1.png</a></li>


</ul>




  </td>
 </tr>
</table>







  </div>
 </body>
</html>


--===============2764145697219099763==--


[Attachment #3 (text/plain)]

_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic