'Classic' and 'Redmond' button icon styles, configurable via Breeze window decoration settings
Needs RevisionPublic

Authored by paulm on Sun, Mar 8, 11:26 PM.

Details

Summary

This implements as described at https://phabricator.kde.org/T12793 and https://forum.kde.org/viewtopic.php?f=285&t=138602&p=370822 Namely, the changes allow you to have different sets of icon styles for the titlebar buttons, while still keeping the overall Breeze style. The motivation to add it was mainly to add the KDE1-inspired 'Classic' style of buttons, while also preserving the original Breeze 'Oxygen' button style for those who prefer it. A 'Redmond' button style is also added. 'Oxygen' remains the default style (though I would prefer 'Classic' as default, but did not want to change defaults without discussion).

Breeze window decoration configuration before patch:

After patch. Configuring the titlebar button icon style: ('Classic' has now been manually selected and 'Draw circle around close button' manually unticked)

The 'Classic' button icon style in more detail (note it also affects MDI icons within applications):

Modifications have been made to both kdecoration and kstyle so that window decorations for both normal windows and MDI applications will be affected, with new designs placed in libbreezecommon as are shared between both. A configuration in the Breeze window decoration settings will affect both kdecoration and kstyle so .kcfg files in each have been updated. 'Oxygen' remains the default style as at present.

A small bug is also fixed in kdecoration/config/breezeconfigwidget.cpp whereby the "Draw a circle around close button" setting does not reset to Defaults properly.

Closes T12793

Diff Detail

Repository
R31 Breeze
Lint
Lint Skipped
Unit
Unit Tests Skipped
paulm created this revision.Sun, Mar 8, 11:26 PM
Restricted Application added a project: Plasma. · View Herald TranscriptSun, Mar 8, 11:26 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
paulm requested review of this revision.Sun, Mar 8, 11:26 PM
ngraham added a subscriber: ngraham.

Wow, looks like this was a lot of work!

Can you add a bit more information about what your goal is here? You're adding different icon styles for the titlebar buttons that you can use while still using the Breeze window decoration theme? Before-and-after screenshots would help too. See also https://community.kde.org/Infrastructure/Phabricator#Include_some_screenshots

Could you add a few words regarding why you think adding this option to the Breeze window decoration theme is right right place for this, as opposed to creating a new window decoration theme or just changing the default appearance? If there's something wrong with the current button appearance, maybe we should just change it. If not, and this is just to satisfy people with different aesthetic preferences, why not make a different window decoration theme?

paulm edited the summary of this revision. (Show Details)Sun, Mar 8, 11:33 PM
ngraham edited the summary of this revision. (Show Details)Sun, Mar 8, 11:33 PM

A small bug is also fixed in kdecoration/config/breezeconfigwidget.cpp whereby the "Draw a circle around close button" setting does not reset to Defaults properly.

Would you mind extracting this into its own patch and submitting it separately? Sounds like a good fix, regardless of whether or not this patch gets merged in its current form or in another form. In general it's best to have each patch/commit do only one thing and not combine new features and bugfixes.

paulm edited the summary of this revision. (Show Details)Mon, Mar 9, 1:54 AM
paulm edited the summary of this revision. (Show Details)
paulm edited the summary of this revision. (Show Details)Mon, Mar 9, 2:10 AM
paulm edited the summary of this revision. (Show Details)
paulm edited the summary of this revision. (Show Details)
paulm added a comment.Mon, Mar 9, 3:08 AM

Can you add a bit more information about what your goal is here? You're adding different icon styles for the titlebar buttons that you can use while still using the Breeze window decoration theme? Before-and-after screenshots would help too. See also https://community.kde.org/Infrastructure/Phabricator#Include_some_screenshots

Hi Nate. Yes, the changes allow you to have different sets of icon styles for the titlebar buttons, while still keeping the overall Breeze style. I have updated the summary. The motivation to add it was mainly to add the 'Classic' button icon style, while also preserving the 'Oxygen' style of button icons for those who like it. I have added screenshots to the summary, and will maybe make another video to show it tomorrow.

Could you add a few words regarding why you think adding this option to the Breeze window decoration theme is right right place for this, as opposed to creating a new window decoration theme or just changing the default appearance? If there's something wrong with the current button appearance, maybe we should just change it. If not, and this is just to satisfy people with different aesthetic preferences, why not make a different window decoration theme?

I added these options to the Breeze window decoration because I liked the overall Breeze style (shading, colours, configurability etc.), just not the icons for the window control buttons (I just don't think the 'Oxygen' style buttons are logical and often initially found myself confused by them, not knowing whether an up-arrow means restore or maximize, not knowing whether a down-arrow means minimize or restore, and not having a clue what the diamond means! I tried to replace it with buttons that visually describe the outcome of the click). However, I know there are some people attached to the 'Oxygen'-style buttons so didn't just want to arrogantly remove them or arrogantly change defaults without some discussion or demonstration (which I hope this provides).

With regards to why not a separate theme, that was actually my original plan, but I wanted to use Breeze as the base. When I asked 3 years ago if there was an Aurorae theme for Breeze that I could edit I was told there was not and that it was just C++; is this still the case today? Can the Breeze theme be easily forked and redistributed in the GetHotNewStuff dialogue box? If so, how, and where to share? I also wanted to change the Application Style as well as the Window Decorations (i.e. the style of buttons to dock/undock and close etc. within applications with dockable panes). Can you easily fork, redistribute and download new Application Styles in the GetHotNewStuff dialogue box as well?

With regards to why not just change the default titlebar button icons. Yes, of course I do indeed think the default titlebar button icons should be changed to what I have called 'Classic' by default :). However, I do realise that defaults can be contentious things that can cause a lot of debate!! With this patch people can at least see the 'Classic' style for themselves and discuss before committing to anything new.

I also think the tiny square minimize icon with 'Classic' visually fits in nicely with the Icons Only Task Manager.

paulm added a comment.Mon, Mar 9, 3:09 AM

A small bug is also fixed in kdecoration/config/breezeconfigwidget.cpp whereby the "Draw a circle around close button" setting does not reset to Defaults properly.

Would you mind extracting this into its own patch and submitting it separately? Sounds like a good fix, regardless of whether or not this patch gets merged in its current form or in another form. In general it's best to have each patch/commit do only one thing and not combine new features and bugfixes.

Sure, I can do that.

In my opinion this should really go into a different decoration. Starting to have "styles inside styles" inside a single decoration is a UI mess.
If you want to turn breeze into a theme engine and not a theme, then so be it, but one must go the full way. Not just essentially duplicating the code to render a different set of visually orthogonal buttons into the engine. The new buttons must have a different entry in the kcm. Not be selectable by an internal option. See how decoration engines like aurorae implements different entries in decoration page as the way it should be.
How is a new user supposed to discover that what she/he sees in the KCM is not the only set of icons she/he can chose ?
Also on the code side, the current patch makes the code maintainability much more complicated.

Now I am not the maintainer any more. So feel free to ignore my opinion here.
But I cannot +1 this, sorry. (although the idea is nice, design is nice, etc.)

Hugo

davidre added a subscriber: davidre.Mon, Mar 9, 8:39 AM

I want to echo the sentiment that Breeze should not gain more options and this instead be a new decoration. I see the issue with mdi windows having different titlebars because they are drawn by the QStyle but you add these options here you are only solving this problem for this particular instance if Breeze decorations and Breeze style is selected. This is no difference as before, there are many popular decorations and we can't add an option for every one of them so that the decorations are consistent.

This is a fundamental limitation because mdi decorations are drawn by the QStyle. Maybe this is a problem to be solved somewhere else like in Qt. In Wayland there is a protocol t ask the server decorations so Qt could use that if available and only than fallback to the style. Or maybe we could do something in KStyle.

With regards to why not a separate theme, that was actually my original plan, but I wanted to use Breeze as the base. When I asked 3 years ago if there was an Aurorae theme for Breeze that I could edit I was told there was not and that it was just C++; is this still the case today? Can the Breeze theme be easily forked and redistributed in the GetHotNewStuff dialogue box? If so, how, and where to share? I also wanted to change the Application Style as well as the Window Decorations (i.e. the style of buttons to dock/undock and close etc. within applications with dockable panes). Can you easily fork, redistribute and download new Application Styles in the GetHotNewStuff dialogue box as well?

If your goal is to have breeze with different button style I think sadly not. I am not that knowledgable what is possible or not with ghns but I think right now it is limited to aurorae. But you could always make a simple auorae theme that looks like breeze (I don't know how hard that is). But there are also popular 3rdparty decorations that are not distributed though GHNS. I keep seeing for example https://github.com/kupiqu/SierraBreezeEnhanced being a popular theme that is a fork of breeze from looking at the code.

Sadly there is also no GHNS for QStyles as it suffers from the same problem that as far as I understand it doesn't support stuff that needs to be compiled and binary compatible to the users system.

ngraham requested changes to this revision.Mon, Mar 9, 3:06 PM

I have to agree with Hugo and David. "Styles within styles" screams "this should just be another window decoration theme" to me as well. Especially since the proposed new window decoration button appearance is not even the default setting, it should be a 3rd-party addon, probably an Aurorae window decoration theme that can be downloaded from GHNS.

This revision now requires changes to proceed.Mon, Mar 9, 3:06 PM

A small bug is also fixed in kdecoration/config/breezeconfigwidget.cpp whereby the "Draw a circle around close button" setting does not reset to Defaults properly.

Would you mind extracting this into its own patch and submitting it separately? Sounds like a good fix, regardless of whether or not this patch gets merged in its current form or in another form. In general it's best to have each patch/commit do only one thing and not combine new features and bugfixes.

This is now submitted at https://phabricator.kde.org/D28087

paulm added a comment.Fri, Mar 27, 7:34 PM

I went ahead and made an Aurorae version of this just to get a feel for how much I could theme. Overall, I am disappointed with Aurorae as Plasma is not as easily customizable as would first meet the eye. Aurorae alone will not let you customize the titlebar buttons as comprehensively as one would initially think:

  • The in-application Application Style also needs titlebar-like button icons as provided in Breeze kstyle (as menitoned by David above)
  • Aurorae does not obey system colour settings, especially for the titlebar itself
  • GTK applications which use the client side window decorations in the titlebar (e.g. Gedit) still require updated SVG files
  • GTK applications such as Chromium require updated .png files (generated with a Python script using Cairo libraries)
  • The icon theme also needs updated as the titlebar buttons are also referenced in other places throughout the UI such as in application menus, in right-click menus and notification pop-ups.

It would be much better if you could change the titlebar button style in one place and would change it in all of these places. That obviously would require some serious rearchitecting of the theme engine.

Therefore, working with what we have now, I also decided to be a bit more bold and try to propose this as the default theme in D28358 / T12793 - this implements the 'Classik' theme changes without the selection box. I also implemented all the changes in the places listed above (GTK and icons) to try and give complete consistency.

I went ahead and made an Aurorae version of this just to get a feel for how much I could theme. Overall, I am disappointed with Aurorae as Plasma is not as easily customizable as would first meet the eye. Aurorae alone will not let you customize the titlebar buttons as comprehensively as one would initially think:

  • The in-application Application Style also needs titlebar-like button icons as provided in Breeze kstyle (as menitoned by David above)
  • Aurorae does not obey system colour settings, especially for the titlebar itself
  • GTK applications which use the client side window decorations in the titlebar (e.g. Gedit) still require updated SVG files
  • GTK applications such as Chromium require updated .png files (generated with a Python script using Cairo libraries)
  • The icon theme also needs updated as the titlebar buttons are also referenced in other places throughout the UI such as in application menus, in right-click menus and notification pop-ups.

    It would be much better if you could change the titlebar button style in one place and would change it in all of these places. That obviously would require some serious rearchitecting of the theme engine.

    Therefore, working with what we have now, I also decided to be a bit more bold and try to propose this as the default theme in D28358 / T12793 - this implements the 'Classik' theme changes without the selection box. I also implemented all the changes in the places listed above (GTK and icons) to try and give complete consistency.

Did you look into aurorae with qml instead of svg? I don't know if that provides the options missing above, but maybe worth a try? Take a look at plastik, the code is located in kwin repository