Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Feature proposal): Window controls icons taken from current window decoration theme #6

Closed
Andrew-Mattias opened this issue Mar 8, 2024 · 19 comments

Comments

@Andrew-Mattias
Copy link

Andrew-Mattias commented Mar 8, 2024

Current default window controls icons (close,minimize,maximize) are cool, but it would be even cooler if they could be optionally set to match current window decoration theme. I use default breeze and my brain itches every time i use this wonderful widget because of non-breeze icons. This is not crucial, but would be very welcomed.

UPD 1: I use cutom icon theme (tela-icon theme). Maybe my window controls icons in widget match icon theme and not window decoration theme?

UPD 2: Here how it looks on my machine. On your screenshots window controls icons were breeze everywhere. A bug maybe?
изображение

UPD 3: Issue of non-matching widget and window decoration WC incons is persistent in both 0.1 and 0.2.3 versions of widget.

UPD 4: I spinned up fresh WM with KDE neon (same as my system where bug was detected) and figured that widget load window control icons from icon theme (not from window decorations theme, which makes sense for every other type of widget exept yours)! I set icon theme to tela-icons theme, installed v2.3 of widget and reproduced issue from UPD 1. To fix non-breeze icons in widget i have to set icon theme to breeze and reboot.
изображение
So, at the end, Window controls icons taken from current window decoration theme would be a great cherry on top of good widget (off-topic: i use your widget on my production machine and i cant be more happy with how fast and robust it is, kudos for great work)

UPD 5: window decorations theme spin of breeze is much cooler than icon theme spin of breeze, because its base shows on mouse hover:

no hover
Снимок экрана_20240309_013253

hover
Снимок экрана_20240309_013426
Снимок экрана_20240309_013515

Hope that icons in widget would behave like in the latter example.

@antroids
Copy link
Owner

antroids commented Mar 12, 2024

Added a theme support to 0.2.6, that is uploaded to the Store.
Could you please check.

The Breeze theme implemented as binary library. Not sure that we can use icons from it.
Probably some Aurorae Breeze theme can be used instead.
The Active window control widget has the Breeze icons included to the package, but I don't want to do the same.

@antroids
Copy link
Owner

I ported Breeze icons implementation into QML.
Added into Release 0.3.3.

@Andrew-Mattias
Copy link
Author

Did i understand you correctly: You added option to use breeze icons by manually hardcoding them into widget?

If so and if it looks identical to icons from UPD 5, its probably okay for me (since i don't plan to use other themes), but i was talking about option to load icons from window decoration theme (a.k.a aurorae theme). Do you plan to add general aurorae themes support?

I imagined it to be separate section inside "Appearance" page named "Button icons theming" with 3 options:
"icons from icon theme" <== default in v2.3 of widget
"icons from aurorae (window decorations) theme" <== proposed feature
"Breeze" <== hardcoded option of yours (if i undestand you correctly)

@antroids
Copy link
Owner

Did i understand you correctly: You added option to use breeze icons by manually hardcoding them into widget?

Yes. The Breeze icons are hardcoded into KDE decoration library, they are not just icons files. Their colors depends on Kirigami. I implemented the same icons in the widget, the only difference is that they will have color theme from the panel, not from window title.

Now there are 3 options for icons theming:

  1. Plasma: based on theme icons.
  2. Breeze: new option.
  3. Aurorae: icons from Aurorae theme, can be chosen in combo box.

@Andrew-Mattias
Copy link
Author

3. Aurorae: icons from Aurorae theme, can be chosen in combo box.

I am going to test this option in a kde neon WM in a couple of minutes,

@Andrew-Mattias
Copy link
Author

Andrew-Mattias commented Mar 14, 2024

I installed latest version of widget (v3.3) and it works mostly fine with aurorae themes. There are 3 issues tho:

  1. It does not recognize aurorae themes installed in kde neon by default (breeze and plastik) for some reason. You can see breeze and plastik installed in system setting but not in the combo box.
    image
    If you have only aurorae themes installed by default, combo box is empty, which was strange for me (i expected at least plastik to be there).
    image
    Hope that aurorae themes installed by default recognition could be fixed.

  2. Buttons aspect ratio customization is a bit broken - it squeezes button icons horizontally but not vertically. It seems that issue persists with any aurorae theme

image
image
image

  1. In v3.3 of widget you must manually choose aurorae theme. It would be nice if in aurorae theme combo box there was an option <Current system Aurorae theme> which pulls icons for widget from current system Aurorae theme (chosen to be used in system settings) for you. Logically, it should also be default option of combo box, when you choose Aurorae instead of plasma. Can it be implemented?

P.S. Hardcoded Breeze theme works well. Thanks!

@antroids
Copy link
Owner

Thank you for the response!

  1. Hope that aurorae themes installed by default recognition could be fixed.

No, the booth Breeze and Plastic are implemented as binary libraries and they unfortunately are not supported as Aurorae themes by the widget.

  1. Buttons aspect ratio customization is a bit broken - it squeezes button icons horizontally but not vertically. It seems that issue persists with any aurorae theme

Aspect ratio is width:height ratio, it works as intended. When the value is less than 100, squeezes horizontally, otherwise vertically. Height is not changing by this parameter. I think you want the Window Margins option. Probably separated button margins option could be helpful too.

  1. In v3.3 of widget you must manually choose aurorae theme. It would be nice if in aurorae theme combo box there was an option which pulls icons for widget from current system Aurorae theme (chosen to be used in system settings) for you. It also should default logically. Can it be implemented?

I cannot see a clean way how to do it.

@Andrew-Mattias
Copy link
Author

Andrew-Mattias commented Mar 14, 2024

No, the booth Breeze and Plastic are implemented as binary libraries and they unfortunately are not supported as Aurorae themes by the widget.

That is unfortunate. : (

I think you want the Window Margins option. Probably separated button margins option could be helpful too.

Yes! Window margins do the trick for resizing buttons, but app icon shrinks too, which is not desired.
изображение
separated button margins (buttons resize) and icon margins (app icon resize) would be nice.

I cannot see a clean way how to do it.

That is sad. : ( But situation still can be improved.

  • If Widget cant detect any aurorae themes, combo box should not be empty, it should contain text <no aurorae themes detected> and should not be active. It is much less obscure than current emty'ish drop-list and more clear.
  • If widget can detect aurorae theme it should contain text <сhoose aurorae theme> and should be active. It makes need to manually choose aurorae theme more obvious and clear.
  • there should be some sort of info button (with "i" or "?" emblem or smth similar) next to combo box, which displays tool-tip with explanation on hover/click:
    "Some window decoration themes, e.g. Breeze or else, could be installed in your system as binary libraries and thus be visible and usable in system settings, but they are not detectable and cannot be used by this widget (unlike auraroe themes). Proceed to install some aurorae themes or use "Breeze" or "Plasma" options in "icons theme" field instead".

@antroids
Copy link
Owner

  1. Button margins option added.
  2. Added tips and messages for empty Aurorae theme ComboBox.

@Andrew-Mattias
Copy link
Author

Andrew-Mattias commented Mar 19, 2024

i will test it today or tomorrow to se if there any hiccups left (to be sure that feature is complete). Kudos for great work!

@Andrew-Mattias
Copy link
Author

Andrew-Mattias commented Mar 20, 2024

Its almost perfect. There are some visual nitpicks, which could be resolved. They are tiny, but they scratch brain and eyes.

I. In "window control buttons" section:

  1. Rename "Icons theme" to "Button icons source", which is more comprehensible, straightforward and less confusing (usually "icons theme" is a reference to Application icons theme, but not here)

  2. Remove first [?] info button and rename ComboBox options as follows:
    Plasma => Plasma: Global icon theme
    Breeze => Breeze: Implicit Breeze icons
    Aurorae => Aurorae: Window decorations theme

There are plenty room inside ComboBox to write full clarification of icons source, and in combination with renaming from pt.1 above, first [?] info button is no longer needed.

1 2

  1. Replace second [?] info button with [!] info button. Information inside tooltip of second [?] info button is not "want know more?" type and more of "warning, limitations!" type, so [!] sign is more appropriate and should grab more attention during first use (which should decrease misunderstanding of feature limitations)

  2. Pin left border of Tooltip to the left border of ComboBox and Pin right border of Tooltip to the right border of second info button. Current tooltip borders are out of place and are not pretty.

изображение

  1. If Aurorae option is selected, but no themes are found, ComboBox is still clickable and gives empty list on click. ComboBox should be deactivated if no Aurorae themes are found, even if Aurorae option is selected.

изображение

  1. Text inside Aurarae theme info button should be come in two variants:

If Aurorae themes are not found, tooltip text should be as follows:

"Some window decorations themes, e.g. Breeze or Plastik, could be installed in your system as binary libraries and thus be visible and usable in System settings, but they are not detectable and cannot be used by this widget. There are no plans to support such binary themes due to technical complications.
-
Regular Aurorae themes for window decorations are supported by this widget and you can install them in System settings through "Window decorations" page or use "Breeze" or "Plasma" options in "icons theme" field above instead"

If some Aurorae themes are found, tooltip text should be as follows:

"Some window decorations themes, e.g. Breeze or Plastik, could be installed in your system as binary libraries and thus be visible and usable in System settings, but they are not detectable and cannot be used by this widget. There are no plans to support such binary themes due to technical complications.
-
You can install more of regular Aurorae themes for window decorations in System settings through "Window decorations" page or use "Breeze" or "Plasma" options in "icons theme" field above instead"

изображение

  1. Rename "Buttons aspect ration %:" to "Correct buttons width/height ratio %:", which is more straightforward and less confusing (new variant of field name tells user exactly what it is doing unlike current variant).

  2. Pin left border of Tooltip to the left border of ComboBox and Pin right border of Tooltip to the right border of second info button. Current tooltip borders are out of place and are not pretty.

  3. Due to renaming from pt.7 it is only logical to remove first sentence from tooltip.

изображение

  1. Pin left border of Tooltip to the left border of ComboBox and Pin right border of Tooltip to the right border of second info button. Current tooltip borders are out of place and are not pretty.

изображение

Most of these issues are minor nitpicks, but every fix will brings some UX improvements and make widget more polished overall. I think that after dealing with above mentioned issues Window control icons customization will be complete and this Github issue could be closed. Thanks for your work!

@Andrew-Mattias
Copy link
Author

Andrew-Mattias commented Mar 20, 2024

BTW, i have an off-topic question: Could you make Plasma 6 reincarnation of "Compact Shutdown" widget (link)?

Default "Log/Logout" widget is meh, because it is not as snappy and you cannot avoid blurred full-screen Plasma shutdown-options menu. An ability to reliably and quickly Shutdown/Reboot/End Session/Lock/Change User/Sleep/Hibernate your machine in two swift clicks was Godsend in Plasma 5. (<active-window-control> and <compact-shutdown> were only third-party widgets i really used. And thanks to you only <compact-shutdown> awaits decent alternative).

AFAIK, Plasma 6 re-implementation should be fairly easy (compared to application-title-bar widget), and should not require much maintenance after being done.

@antroids
Copy link
Owner

BTW, i have an off-topic question: Could you make Plasma 6 reincarnation of "Compact Shutdown" widget (link)? Default "Log/Logout" widget is meh, because it is not as snappy and you cannot avoid blurred full-screen Plasma shutdown options menu. An ability to reliably and quickly Shutdown/Reboot/End Session/Lock/Change User/Sleep/Hibernate your machine in two swift clicks was Godsent. Plasma 6 re-implementation should be fairly easy (compared to application-title-bar widget), and should not require much maintenance after being done.

You could check Quick Shutdown, looks like it is under active development now.

@Andrew-Mattias
Copy link
Author

You could check Quick Shutdown, looks like it is under active development now.

Thanks for the hint! This widget is functionally sufficient, but its nonadjustable default appearance leaves lot to be desired. Thanks for help nevertheless.

antroids added a commit that referenced this issue Mar 22, 2024
antroids added a commit that referenced this issue Mar 22, 2024
@antroids
Copy link
Owner

Thank you for the suggestions!
Unfortunately the ContextualHelpButton component cannot be customized in that way.
The icon is "help-contextual" and it depends on theme:
image

I added suggestions 1, 2, 5, 6, 7 into version 0.4.3

@Andrew-Mattias
Copy link
Author

Window control buttons theming is now complete (cant imagine how to improve this aspect of a widget further).
I think it is logical to close this feature request as complete.

@KaKi87
Copy link

KaKi87 commented May 8, 2024

Hi,

I'm using the Plasma: Global icon theme option, with the default Breeze Dark theme, which mostly work fine, except :

  • regardless of how I play with Wiget margins and Buttons width/height ratio, I can't get these buttons to the same size as default Plasma's window decoration buttons size ;
  • I can't find out how to make the close white instead of red when not hovered, also like default Plasma's window decoration buttons behave.

Thanks

@antroids
Copy link
Owner

antroids commented May 8, 2024

Hi,

I'm using the Plasma: Global icon theme option, with the default Breeze Dark theme, which mostly work fine, except :

  • regardless of how I play with Wiget margins and Buttons width/height ratio, I can't get these buttons to the same size as default Plasma's window decoration buttons size ;
  • I can't find out how to make the close white instead of red when not hovered, also like default Plasma's window decoration buttons behave.

Thanks

You can switch to "Breeze: Implicit Breeze icons" option to get Breeze icons, which used by default in Plasma desktop.
Could you attach a screenshot if it is still different from your theme.
However, colors can be different because window decorations and panels are using different themes.

@KaKi87
Copy link

KaKi87 commented May 8, 2024

That works, thanks !

So, to make the panel buttons have the same size as the decorations buttons, I set Wiget margins to 5 and Buttons width/height ratio back to the default 100.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants