Bug 378630 - Cannot create theme with properly scalable titlebar
Summary: Cannot create theme with properly scalable titlebar
Status: RESOLVED INTENTIONAL
Alias: None
Product: kwin
Classification: Plasma
Component: aurorae (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-10 16:32 UTC by Andreas
Modified: 2017-04-10 20:11 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
mockup (5.05 KB, image/png)
2017-04-10 17:09 UTC, Andreas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas 2017-04-10 16:32:07 UTC
Background:
I tried to port a (fairly typical) window decoration to aurorae. it basically has a 2px outer border on all sides (1px dark contour, 1px highlight), and a vertical titlebar gradient, which is stretched to fill the remaining height of the titlebar.

My issue:
First, i was happy to find that each button is a FrameSvg with its own borders, so i could create properly scalable buttons with contours.
However, i found that the entire window decoration is provided by only one FrameSvg 'decoration' in Aurorae. This means that the titlebar is provided solely by 'decoration-top', 'decoration-topleft', and 'decoration-topright'. If the size of the titlebar changes, decoration-top is tiled, which is obviously not desired. However, stretching it instead wouldn't do either, as then the 2px top contour of the titlebar would be stretched along.
As an ugly workaround, i could make decoration-top larger than any reasonably expectable titlebar height, but in this case, with a lower-size titlebar, only the top color of the titlebar gradient would be visible.

My wishlist:
Use one entire FrameSvg for the titlebar alone. After all, the Titlebar itself is a resizeable object (due to varying font sizes, user preferences, etc) and therefore deserves an entire FrameSvg for itself. The titlebar gradient would then go into [proposed FrameSvg]-center and would be resizable.

i know you stated before something like 'aurorae is not supposed to be a default option' (with regard to color-scheme support), so i tagged this 'wishlist'.

regards,
Andi
Comment 1 Andreas 2017-04-10 17:09:01 UTC
Created attachment 104951 [details]
mockup

i added a mockup to illustrate what i mean
Comment 2 Martin Flöser 2017-04-10 20:11:31 UTC
Please use the Qml support to do more complex themes. The SVG theme support won't be adjusted any more. Introducing changes there is very difficult and have a chance to break existing themes.