[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-01 16:21:10
Message-ID: 20180201162110.1.A0F1ACE2DA217806 () phabricator ! kde ! org
[Download RAW message or body]
hpereiradacosta added a comment.
In https://phabricator.kde.org/D10170#199153, @anemeth wrote:
> Now only enabled blur when the frame is transparent.
>
> @hpereiradacosta
> drawPanelMenuPrimitive only runs once per panel creation and not 60 times per \
second, right?
Well it is also probably called every time the selected (on mouse-over) item \
changes. So basically everytime you move the mouse in the list. Now setting the \
property only once per menu (or rather, only at creation or when its sizes change), \
would require quite a bit more machinery. Probably something like a \
"breezeblurhelper" to which you would need to register the menu at creation (in \
::polish) and then deal with resizeevent and configuration changes inside there. \
Unless you feel like giving it a shot yourself, I could probably take care of that \
when this code is committed. There was some code of this kind (more complex though), \
in the now decommissioned oxygen-transparent code. That was called oxygenblurhelper. \
> This is what enabled blur behind a window: \
https://github.com/KDE/kwindowsystem/blob/master/src/platforms/xcb/kwindoweffects.cpp#L245
> I don't think it checks if it's already enabled.
> But if it's called only once per panel then it's not an issue.
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><blockquote style="border-left: 3px solid \
#8C98B8; color: #6B748C;
font-style: italic;
margin: 4px 0 12px 0;
padding: 8px 12px;
background-color: #F8F9FC;">
<div style="font-style: normal;
padding-bottom: 4px;">In <a \
href="https://phabricator.kde.org/D10170#199153" style="background-color: #e7e7e7; \
border-color: #e7e7e7; border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;" rel="noreferrer">D10170#199153</a>, <a \
href="https://phabricator.kde.org/p/anemeth/" style=" border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@anemeth</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>Now only enabled blur when the frame is \
transparent.</p>
<p><a href="https://phabricator.kde.org/p/hpereiradacosta/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;" rel="noreferrer">@hpereiradacosta</a><br />
drawPanelMenuPrimitive only runs once per panel creation and not 60 times per \
second, right?</p></div> </blockquote>
<p>Well it is also probably called every time the selected (on mouse-over) item \
changes. So basically everytime you move the mouse in the list. <br /> Now setting \
the property only once per menu (or rather, only at creation or when its sizes \
change), would require quite a bit more machinery. Probably something like a \
"breezeblurhelper" to which you would need to register the menu at creation \
(in ::polish) and then deal with resizeevent and configuration changes inside there. \
<br /> Unless you feel like giving it a shot yourself, I could probably take care of \
that when this code is committed.<br /> There was some code of this kind (more \
complex though), in the now decommissioned oxygen-transparent code. That was called \
oxygenblurhelper.</p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: \
italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>This \
is what enabled blur behind a window: <a \
href="https://github.com/KDE/kwindowsystem/blob/master/src/platforms/xcb/kwindoweffects.cpp#L245" \
class="remarkup-link" target="_blank" \
rel="noreferrer">https://github.com/KDE/kwindowsystem/blob/master/src/platforms/xcb/kwindoweffects.cpp#L245</a><br \
/> I don't think it checks if it's already enabled.<br />
But if it's called only once per panel then it's not an \
issue.</p></blockquote>
</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