-
Notifications
You must be signed in to change notification settings - Fork 43
Panel : Unify icon sizes #328
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
base: master
Are you sure you want to change the base?
Conversation
|
I had previously considered using 0 or -1 as 'use panel size' but left it for another time as I wasn't sure how best to pass this changed information to existing users. Overall a good implementation, but doubling up on the config reload logic should be avoided |
|
What do you call « doubling up on the config reload logic » ? The reload_css function ? if so, i’d agree it seems pretty dumb, with the alternative being to make the widgets read the value themselves to choose what css class to apply, no ? |
|
ideally we should remove the reload_css function again and implement one extra CssFromConfig class The rules for specific icons would need to be given a higher css priority (achieved by making it slightly more specific) and the fallback could be relatively less specific This is paper napkin code, I've probably typoed a bit here. |
|
Also, not for this PR, and mostly as a reminder to myself... I think I should rethink the doubled-up code in the CssFromConfig classes as each one has a copy-pasted section |
Wouldn’t we still need essentially the same thing as the css_reload function though ? It is there to handle the case when, while the panel is changed, the user changes the configuration of one (or more)’s widget size from a non 0 value (so, one where there would be a css rule created for it) to a 0 (one without a custom rule). Am i missing something that allows what you are saying to handle this case ? |
|
That case is handled in my example by the |
By default, icons of widgets will now follow the size of the panel.
Adds a css config for a default size for icons, which is overriden by the configuration entry for each icon if it is not 0. Meanwhile, the default becomes 0.
Adjusted the panel’s default height to keep icon sizes the same as the default configuration (32), and left the menu and launchers at 42. Personally, i would think that setting them all to 0 and setting the panel’s default minimal height to 42 would be preferable, it would also lead to other widgets being slightly bigger by default.
The icon size of launchers was getting applied to the menu widget as well, probably because it didn’t have a config option of it’s own. Added one.
This also fixes command-output’s size not actually being accounted for.
Example/default ini file has not yet been changed for any of this.
Also, potential breaking change we could for the sake for name consistency, if we value this more than not breaking things (probably not very wise but it annoys me personally) : rename laucher’s icon size
launchers_sizetolaunchers_icon_size.Addresses #269