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

List:       kde-panel-devel
Subject:    [Differential] [Commented On] D3131: Show full scrollbar only on mouse over
From:       "hpereiradacosta (Hugo Pereira Da Costa)" <noreply () phabricator ! kde ! org>
Date:       2016-10-28 14:40:54
Message-ID: 20161028143048.41170.49191.9FC49647 () phabricator ! kde ! org
[Download RAW message or body]

hpereiradacosta added a comment.


  Just added a  couple of comments inline.
  Also, (and somewhat out of topic), playing with the scrollbar width is rather easy: \
just change  
    ScrollBar_Extend,
    ScrollBar_SliderWidth,
    ScrollBar_MinSliderHeight
  
  In breeze.h
  I experienced with using 14, 6 and 6 for these dimensions, and the result is quite \
pleasing I think (6 is the progressbar groove width).  Feel free to commit this in a \
separate post if vdg is happy about it.  Now making this configurable is a complete \
different story, and in fact it is in "todo list" because ultimately, I think we want \
a slim (or compact) mode for breeze, to please people who complain about it wasting \
too much space.  (but this is completely out of topic :))

INLINE COMMENTS

> breezescrollbardata.h:109
> addLineAnimation().data()->setDuration( duration );
> subLineAnimation().data()->setDuration( duration );
> }

Here you miss a grooveAnimation().data()->setDuration( duration );

This makes sure that the groove animation is also updated "on fly" when animation \
durations is changed (otherwise the change is only taken into account for newly \
created scrollbars)

> breezestyle.cpp:4964
> const qreal opacity( _animations->scrollBarEngine().opacity( widget, \
> SC_ScrollBarSlider ) ); +        QColor color = _helper->scrollBarHandleColor( \
> palette, mouseOver, hasFocus, opacity, mode ); 

can be made a const again, right ?

> breezestyle.cpp:4966
> 
> -        const QColor color( _helper->scrollBarHandleColor( palette, mouseOver, \
>                 hasFocus, opacity, mode ) );
> -        _helper->renderScrollBarHandle( painter, handleRect, color );
> +        if( StyleConfigData::scrollBarShowOnMouseOver() ) {
> +            // finally, global opacity when ScrollBarShowOnMouseOver

this entire block can go, right ? 
In fact my compiler complains about unused variable

> breezestyle.cpp:6374
> +
> +        if (opacity == -1) opacity = 1;
> 

you could use AnimationData::OpacityInvalid instead of -1

REPOSITORY
  rBREEZE Breeze

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

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: mart, #plasma, #breeze, #vdg, hpereiradacosta
Cc: plasma-devel, abetts, lesliezhai, ali-mohamed, jensreuterberg, sebas


[Attachment #3 (text/html)]

<table><tr><td style="">hpereiradacosta added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D3131" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><p>Just added a  couple of comments \
inline.<br /> Also, (and somewhat out of topic), playing with the scrollbar width is \
rather easy: just change</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" \
data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; padding: \
12px; margin: 0; background: rgba(71, 87, 120, 0.08);">ScrollBar_Extend, \
ScrollBar_SliderWidth, ScrollBar_MinSliderHeight</pre></div>

<p>In breeze.h<br />
I experienced with using 14, 6 and 6 for these dimensions, and the result is quite \
pleasing I think (6 is the progressbar groove width).<br /> Feel free to commit this \
in a separate post if vdg is happy about it.<br /> Now making this configurable is a \
complete different story, and in fact it is in &quot;todo list&quot; because \
ultimately, I think we want a slim (or compact) mode for breeze, to please people who \
complain about it wasting too much space.<br /> (but this is completely out of topic \
:))</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div \
style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D3131#inline-12393" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezescrollbardata.h:109</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; ">            <span class="n">addLineAnimation</span><span \
class="p">().</span><span class="n">data</span><span class="p">()</span><span \
style="color: #aa2211">-&gt;</span><span class="n">setDuration</span><span \
class="p">(</span> <span class="n">duration</span> <span class="p">);</span> \
</div><div style="padding: 0 8px; margin: 0 4px; ">            <span \
class="n">subLineAnimation</span><span class="p">().</span><span \
class="n">data</span><span class="p">()</span><span style="color: \
#aa2211">-&gt;</span><span class="n">setDuration</span><span class="p">(</span> <span \
class="n">duration</span> <span class="p">);</span> </div><div style="padding: 0 8px; \
margin: 0 4px; ">        <span class="p">}</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Here \
you miss a grooveAnimation().data()-&gt;setDuration( duration );</p>

<p style="padding: 0; margin: 8px;">This makes sure that the groove animation is also \
updated &quot;on fly&quot; when animation durations is changed (otherwise the change \
is only taken into account for newly created scrollbars)</p></div></div><br /><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D3131#inline-12395" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezestyle.cpp:4964</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; ">        const qreal opacity( \
_animations-&gt;scrollBarEngine().opacity( widget, SC_ScrollBarSlider ) ); </div><div \
style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        QColor color = \
_helper-&gt;scrollBarHandleColor( palette, mouseOver, hasFocus, opacity, mode ); \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">can be made a const again, right ?</p></div></div><br /><div \
style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; \
background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 \
1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; \
overflow: hidden;"><a style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D3131#inline-12394" rel="noreferrer">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezestyle.cpp:4966</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #ffd0d0;">        <span class="bright">const QColor color( \
_helper-&gt;scrollBarHandleColor( palette, mouseOver, hasFocus, opacity, mode ) \
);</span> </div><div style="padding: 0 8px; margin: 0 4px; background: #ffd0d0;">     \
<span class="bright">_helper-&gt;renderScrollBarHandle( painter, handleRect, color \
);</span> </div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">     \
<span class="bright">if( StyleConfigData::scrollBarShowOnMouseOver() ) {</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: #d0ffd0;">        <span \
class="bright">    // finally, global opacity when ScrollBarShowOnMouseOver</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">this entire block can go, right ? <br /> In fact my compiler complains \
about unused variable</p></div></div><br /><div style="border: 1px solid #C7CCD9; \
border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: \
#e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: \
#74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: \
right; text-decoration: none;" href="https://phabricator.kde.org/D3131#inline-12396" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezestyle.cpp:6374</span></div> <div style="font: 11px/15px \
&quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: \
pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; \
margin: 0 4px; background: #d0ffd0;">        if (opacity == -1) opacity = 1; \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">you could use AnimationData::OpacityInvalid instead of \
-1</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>rBREEZE Breeze</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D3131" \
rel="noreferrer">https://phabricator.kde.org/D3131</a></div></div><br \
/><div><strong>EMAIL PREFERENCES</strong><div><a \
href="https://phabricator.kde.org/settings/panel/emailpreferences/" \
rel="noreferrer">https://phabricator.kde.org/settings/panel/emailpreferences/</a></div></div><br \
/><div><strong>To: </strong>mart, Plasma, Breeze, VDG, hpereiradacosta<br \
/><strong>Cc: </strong>plasma-devel, abetts, lesliezhai, ali-mohamed, jensreuterberg, \
sebas<br /></div>



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

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