This patch introduces adaptive panel opacity, where if a window is maximized, the panel becomes opaque.
Configuration is added in order to allow a user to opt out of adaptive opacity.
davidedmundson | |
niccolove |
Plasma | |
VDG |
This patch introduces adaptive panel opacity, where if a window is maximized, the panel becomes opaque.
Configuration is added in order to allow a user to opt out of adaptive opacity.
No Linters Available |
No Unit Test Coverage |
Buildable 25142 | |
Build 25160: arc lint + arc unit |
See the discussion in D28353.
Essentially, we ran into a design issue whereby increasing the transparency of the panel looked bad when a window was maximized against it, impeding our ability to do so. Simultaneously, having an even slightly transparent panel with a window maximized against it results in an inconsistency between the opaque window and the transparent panel. With this patch/change, we get the aesthetic benefits of greater transparency when there isn't a window maximized against the panel, and the functional and consistency benefits of an opaque panel when there is a window maximized against the panel.
Thanks Nate for explaining.
Couple of things that hit my mind:
Yeah plasmoid pop-ups should probably also be opaque when the panel is opaque, good call.
Ok, so the logic is - the goal is to blend in. If you're not showing the desktop, you can't blend in to it. I can at least understand the thought process.
Code wise, this needs a lot of work.
You're rendering a transparent panel. we're still even blurring the background very expensively. And then we're drawing something on top. That's very wasteful.
We're also mixing up shadows from one SVG with the output of another.
Also our isMaximised detection is horrific.
We also need to think about how this plays in with other themes. You can't assume everyone uses Breeze.
desktoppackage/contents/views/Panel.qml | ||
---|---|---|
67 | why |
You're rendering a transparent panel. we're still even blurring the background very expensively. And then we're drawing something on top. That's very wasteful.
We're also mixing up shadows from one SVG with the output of another.
Right. Originally I just changed the svg to be opaque, but I couldn't get a transition out of it. Also, I guess this doesn't solve the blurring problem.
Also our isMaximised detection is horrific.
What do you mean with our? Is the way I used TaskManager very wrong (quite possible) or is the window.isMaximized implementation bad in win?
We also need to think about how this plays in with other themes. You can't assume everyone uses Breeze.
I checked this. It always fallback to Breeze opaque background following the theme colors, so it should always work without breaking them.
or is the window.isMaximized implementation bad in win?
The problematic part of this patch is that whenever any property on any window changes we're checking all items.
We only want to:
It would also be nice to turn off transparency for a panel that has a window tiled against its screen edge, but not fully maximized. Is that feasible?
I have a question though: we ship the pager widget in the panel that does the same by default. Wouldn't that have the same efficiency impact, if not even more?
+1 for making this a user-controllable setting, but how does it interact with plasma themes where there isn't any transparency? Can we only show this UI for plasma themes with transparency?
Shouldn't it be a setting of the theme rather than a button somewhere?
It's a weird thing for a user to be specific about.
I feel like it makes sense for the user to want to use a opaque panel rather than a transparent one. Also, that relies on themes actually turning on the effect, while users could already benefit from it even on current themes if the setting was exposed. Also, that allows for making only some panels adaptive, unity-stile. However, as far as I know, there's no [easy] way to detect transparency from the theme. I might be wrong here.
Works for me.
In terms of the UI and the scope, I have to agree with @apol though, and maybe go a bit further: I think this should be either a global setting that applies to all transparent Plasma stuff (dialogs, pop-ups, panels, widgets, etc) or a setting specific to the Breeze Plasma theme--which would first require that we create such a UI (Plasma Theme Explorer doesn't count).
Having it only affect the panel feels a bit off TBH. If I'm the kind of person who hates transparency, I want it off for everything else too. If I'm in the target user group who doesn't change the defaults, I'll think it's weird that the panel itself becomes opaque for a maximized window, but not the pop-ups for widgets on that panel.
Also I see an interesting visual glitch when a window is un-maximized:
@davidedmundson can you take another look at the general direction of the code here? I'd like to know your thoughts on the direction this code is using before I start spending time sanding off the rough parts
But then you post a video where the panel has no internal margins :P
Give a look to the task manager: normally, there's a margin between it and panel border. This patch currently removes the margin set by the desktop theme.
I still don't notice what you're trying to point out, so I'll take your word for it. :p