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

Panel icon size up to 128px #11690

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

EvilGremlin
Copy link

@EvilGremlin EvilGremlin commented Jun 7, 2023

I found current max very limiting, especially in multi-monitor configs. There can be all kinds of combinations and needs (personally i use 40 and 64px now). Potentially even 128 might be not quite enough in some setups, as we're pushing above 4K now (yes, i know about UI scaling, it's not always applicable)

@clefebvre
Copy link
Member

Just one thing about the icon sizes... most themes only have 32, 48, 64, 96, 128... there are no 40, 56..etc. These are there to make sure the icons are crisp.

@EvilGremlin
Copy link
Author

Good point... irrelevant with SVG icons, but with will 56 be downscaled from 64 or upscaled from 48?

@@ -42,7 +42,7 @@ const APPLETS_DROP_ANIMATION_TIME = 0.2;
const PANEL_PEEK_TIME = 1500;

const EDIT_MODE_MIN_BOX_SIZE = 25;
const VALID_ICON_SIZE_VALUES = [-1, 0, 16, 22, 24, 32, 48];
const VALID_ICON_SIZE_VALUES = [-1, 0, 16, 22, 24, 32, 48, 64, 72, 80, 96, 128];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you missing additional sizes here? (40, 56)

@mtwebster
Copy link
Member

will 56 be downscaled from 64 or upscaled from 48
For named/theme icons, the starting size/file is chosen by the GtkIconTheme:
https://github.com/GNOME/gtk/blob/8ff9b2f83ff491cbfcbf9b30c706bd917679e7cc/gtk/gtkicontheme.c#L2975

I tried this out, and one issue is that it immediately changes the look of my panels.

The default panel size is 40. Currently, that size's optimal color icon is 32px (if (maxSize < 48) return 32;...).

The new behavior would now return 40 (else if (maxSize < 48) return 40;...). This ends up, at least in my case, with a bit of a broken layout, with larger icons offset in my panel:

image

It's important to us to not impact users' existing desktop

@JosephMcc
Copy link
Contributor

@clefebvre is right. This should not use sizes that are not typically contained in icon themes. As soon as you scale you will get blurry icons. You also cannot depend on themes using SVG as many do not.

@EvilGremlin
Copy link
Author

Yeah, it needs some testing and polish, to only downscale when there is higher res.
But if there's no higher resolutuion - it's totally ok to upscale. Ideally, it should be done using some algorythms from emulators, so 32>256 won't turn into blurry splotch.

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

Successfully merging this pull request may close these issues.

4 participants