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

List:       kde-panel-devel
Subject:    Re: Review Request 124014: Add QQC clone of KColorButton
From:       "David Edmundson" <david () davidedmundson ! co ! uk>
Date:       2015-06-06 10:23:18
Message-ID: 20150606102318.8350.93879 () mimi ! kde ! org
[Download RAW message or body]

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



> On June 5, 2015, 3:44 p.m., Marco Martin wrote:
> > for qstyle based stuff we are depending on the qt devicepixelratio var, right?

For all QQC stuff, yes.


> On June 5, 2015, 3:44 p.m., Marco Martin wrote:
> > src/qmlcontrols/kquickcontrols/ColorButton.qml, line 40
> > <https://git.reviewboard.kde.org/r/124014/diff/1/?file=378857#file378857line40>
> > 
> > this may look very different with different qstyles? (like oxygen that has huge \
> > margin/border area around buttons)

It looks OK on what I tested. I know it's not ideal, but nothing we have is (units \
wouldn't help)

Basically I need QStyle::sizeFromContents() but I can't use that because:
- it's not exported in any public API
- we should work with all QQC themes and not just assume it's running the desktop \
one.

You'd think one could probe the style.padding, but for the QQC desktop theme that's \
not set properly.

Hopefully at the end of the Qt Contributor Summit, I'll be able to come back with a \
solution for a future Qt, and then we'll only have to fix it in this one place.


- David


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


On June 5, 2015, 10:46 a.m., David Edmundson wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124014/
> -----------------------------------------------------------
> 
> (Updated June 5, 2015, 10:46 a.m.)
> 
> 
> Review request for KDE Frameworks and Plasma.
> 
> 
> Repository: kdeclarative
> 
> 
> Description
> -------
> 
> Add QQC clone of KColorButton. 
> 
> It's being used by SystemLoadViewer Plasmoid, Kai's clock review, and a mod I'm \
> doing for the notes plasmoid and it's something we'll want to have. 
> High DPI support works perfectly as these are device independent pixels.
> 
> 
> Diffs
> -----
> 
> src/qmlcontrols/kquickcontrols/CMakeLists.txt \
> b7c08d7bcb46e53407d4b44fa593346f9d0a2137  \
> src/qmlcontrols/kquickcontrols/ColorButton.qml PRE-CREATION  \
> src/qmlcontrols/kquickcontrols/qmldir 31d8b145bf50491f94a14ba317b215fd6cc0ca32  \
> tests/colorButtonTest.qml PRE-CREATION  
> Diff: https://git.reviewboard.kde.org/r/124014/diff/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> David Edmundson
> 
> 


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




<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/124014/">https://git.reviewboard.kde.org/r/124014/</a>
  </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 5th, 2015, 3:44 p.m. UTC, <b>Marco \
Martin</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">for qstyle based stuff we are depending on the qt \
devicepixelratio var, right?</p></pre>  </blockquote>







</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;"><p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">For \
all QQC stuff, yes.</p></pre> <br />







<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: \
10px;">  <p style="margin-top: 0;">On June 5th, 2015, 3:44 p.m. UTC, <b>Marco \
Martin</b> wrote:</p>  <blockquote style="margin-left: 1em; border-left: 2px solid \
#d0d0d0; padding-left: 10px;">  


<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/124014/diff/1/?file=378857#file378857line40" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/qmlcontrols/kquickcontrols/ColorButton.qml</a>  <span \
style="font-weight: normal;">

     (Diff revision 1)

    </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">40</font></th>  <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">    <span \
class="nx">readonly</span> <span class="nx">property</span> <span \
class="nx">real</span> <span class="nx">_buttonMarigns</span><span class="o">:</span> \
<span class="mi">4</span> <span class="c1">// same as QStyles. Remove if we can get \
this provided by the QQC theme</span></pre></td>  </tr>

 </tbody>

</table>

  <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;">this \
may look very different with different qstyles? (like oxygen that has huge \
margin/border area around buttons)</p></pre>  </blockquote>





</blockquote>
<pre style="margin-left: 1em; 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;">It looks OK on what I tested. I know it's not ideal, but nothing we have is \
(units wouldn't help)</p> <p style="padding: 0;text-rendering: inherit;margin: \
0;line-height: inherit;white-space: inherit;">Basically I need \
                QStyle::sizeFromContents() but I can't use that because:
- it's not exported in any public API
- we should work with all QQC themes and not just assume it's running the desktop \
one.</p> <p style="padding: 0;text-rendering: inherit;margin: 0;line-height: \
inherit;white-space: inherit;">You'd think one could probe the style.padding, but for \
the QQC desktop theme that's not set properly.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: \
inherit;">Hopefully at the end of the Qt Contributor Summit, I'll be able to come \
back with a solution for a future Qt, and then we'll only have to fix it in this one \
place.</p></pre> <br />




<p>- David</p>


<br />
<p>On June 5th, 2015, 10:46 a.m. UTC, David Edmundson 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 David Edmundson.</div>


<p style="color: grey;"><i>Updated June 5, 2015, 10:46 a.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
kdeclarative
</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;">Add QQC clone of KColorButton. </p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">It's \
being used by SystemLoadViewer Plasmoid, Kai's clock review, and a mod I'm doing for \
the notes plasmoid and it's something we'll want to have.</p> <p style="padding: \
0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">High \
DPI support works perfectly as these are device independent pixels.</p></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>src/qmlcontrols/kquickcontrols/CMakeLists.txt <span style="color: \
grey">(b7c08d7bcb46e53407d4b44fa593346f9d0a2137)</span></li>

 <li>src/qmlcontrols/kquickcontrols/ColorButton.qml <span style="color: \
grey">(PRE-CREATION)</span></li>

 <li>src/qmlcontrols/kquickcontrols/qmldir <span style="color: \
grey">(31d8b145bf50491f94a14ba317b215fd6cc0ca32)</span></li>

 <li>tests/colorButtonTest.qml <span style="color: grey">(PRE-CREATION)</span></li>

</ul>

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






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







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


--===============0344536018176442934==--


[Attachment #3 (text/plain)]

_______________________________________________
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