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

List:       kde-panel-devel
Subject:    D10170: Added optional transparency/blur to menu frames
From:       Hugo Pereira Da Costa <noreply () phabricator ! kde ! org>
Date:       2018-02-06 10:12:03
Message-ID: 20180206101203.1.FCBC72DDF2EB03B8 () phabricator ! kde ! org
[Download RAW message or body]

hpereiradacosta added a comment.


  Hello,
  
  Thanks for the updated patch and for the work on BlurHelper. 
  Couple more comments below.
  
  Hugo

INLINE COMMENTS

> breezeblurhelper.cpp:144
> +        if (!blurRegion.isEmpty()) {
> +            #if !BREEZE_USE_KDE4
> +            KWindowEffects::enableBlurBehind(widget->winId(), true, blurRegion);

ok. So this is awkward. The whole code (the whole class in fact), does nothing for \
KDE4 (because of KWindowEffects not being available). We should then not have the \
event filters installed, nor even the blur helper created, etc. Alternatively, one \
would need to duplicate the code from KWIndowEffect. as done in the original oxygen \
code.

For KF5, it is definitly better to use KWindowsEffect. so fine.
For kDE4 applications, not having the blur behind the translucent window is an issue \
(and there still are some kde4 applications around). So there, one should either

- duplicate the code (for this #ifdef branch only
- disable the blur (as now), and possibly also the transparency (in order not to \
endup with transparent menus and no blur).

> breezestyle.cpp:3632
> +            // force registration of widget
> +            _blurHelper->registerWidget( widget->window() );
> +        }

This should go to Breeze::Style::polish.
There is already a "if( qobject_cast<QMenu*>( widget )" there. Just move this to the \
corresponding code block.

REPOSITORY
  R31 Breeze

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

To: anemeth, hpereiradacosta, #plasma, colomar, alake
Cc: fredrik, alake, januz, abetts, colomar, andreask, zzag, ngraham, plasma-devel, \
ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, sebas, apol, mart


[Attachment #3 (unknown)]

<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/D10170" rel="noreferrer">View \
Revision</a></tr></table><br /><div><div><p>Hello,</p>

<p>Thanks for the updated patch and for the work on BlurHelper. <br />
Couple more comments below.</p>

<p>Hugo</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/D10170#inline-48138" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezeblurhelper.cpp:144</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: rgba(151, 234, 151, .6);">        <span style="color: \
#aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span \
class="n">blurRegion</span><span class="p">.</span><span \
class="n">isEmpty</span><span class="p">())</span> <span class="p">{</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, \
.6);">            <span style="color: #304a96">#if !BREEZE_USE_KDE4</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">          \
<span class="n">KWindowEffects</span><span style="color: #aa2211">::</span><span \
class="n">enableBlurBehind</span><span class="p">(</span><span \
class="n">widget</span><span style="color: #aa2211">-&gt;</span><span \
class="n">winId</span><span class="p">(),</span> <span style="color: \
#304a96">true</span><span class="p">,</span> <span class="n">blurRegion</span><span \
class="p">);</span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">ok. \
So this is awkward. The whole code (the whole class in fact), does nothing for KDE4 \
(because of KWindowEffects not being available).<br /> We should then not have the \
event filters installed, nor even the blur helper created, etc.<br /> Alternatively, \
one would need to duplicate the code from KWIndowEffect. as done in the original \
oxygen code.</p>

<p style="padding: 0; margin: 8px;">For KF5, it is definitly better to use \
KWindowsEffect. so fine.<br /> For kDE4 applications, not having the blur behind the \
translucent window is an issue (and there still are some kde4 applications \
around).<br /> So there, one should either</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">duplicate the code (for this #ifdef branch only</li>
<li class="remarkup-list-item">disable the blur (as now), and possibly also the \
transparency (in order not to endup with transparent menus and no blur).</li> \
</ul></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/D10170#inline-48134" \
rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: \
bold;">breezestyle.cpp:3632</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: rgba(151, 234, 151, .6);">            // force \
registration of widget </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);">            _blurHelper-&gt;registerWidget( \
widget-&gt;window() ); </div><div style="padding: 0 8px; margin: 0 4px; background: \
rgba(151, 234, 151, .6);">        } </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">This \
should go to Breeze::Style::polish.<br /> There is already a &quot;if( \
qobject_cast&lt;QMenu*&gt;( widget )&quot; there. Just move this to the corresponding \
code block.</p></div></div></div></div></div><br \
/><div><strong>REPOSITORY</strong><div><div>R31 Breeze</div></div></div><br \
/><div><strong>REVISION DETAIL</strong><div><a \
href="https://phabricator.kde.org/D10170" \
rel="noreferrer">https://phabricator.kde.org/D10170</a></div></div><br \
/><div><strong>To: </strong>anemeth, hpereiradacosta, Plasma, colomar, alake<br \
/><strong>Cc: </strong>fredrik, alake, januz, abetts, colomar, andreask, zzag, \
ngraham, plasma-devel, ZrenBot, progwolff, lesliezhai, ali-mohamed, jensreuterberg, \
sebas, apol, mart<br /></div>



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

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