Skip to content

gicon-based buttons to workaround the scaling issue - #356

Merged
jonian merged 2 commits into
hardpixel:masterfrom
ilya-m32:variable-scale-icon-fix
Oct 27, 2024
Merged

jonian merged 2 commits into
hardpixel:masterfrom
ilya-m32:variable-scale-icon-fix

Conversation

@ilya-m32

@ilya-m32 ilya-m32 commented Nov 27, 2023 •

Copy link
Copy Markdown
Contributor

Needs discussion, not for merging

A workaround for #106

It seems that the problem still exist in gnome-shell=45.0 and there's no reaction from the gnome team.

Since the bug is very annoying to me, I decided to take a look if there are any fixes we can do now. I found that if we leverage gicons instead of CSS backgrounds, shell renders icon size correctly after the screen scale changes. It is less convenient than CSS-based styling but works as intended.

For testing purposes, I converted adwaita and ambience themes to gicons in backward-compatible fashion and personally satisfied with this workaround.

@jonian let me know what do you think. I can make a separate independent theme with this fix (for people like me with multi-scale setups) or try to convert other themes to gicons as well.

To all: extra testing could be also useful. I only tested this is gnome 45.0 with these two themes.

UPD 26.10.2024
As agreed before, I converted this MR to make workaround optional. It can be enabled via extension options.
image

@ilya-m32 ilya-m32 changed the title Icon-based buttons to workaround scaling issue gicon-based buttons to workaround the scaling issue Nov 27, 2023
@ilya-m32
ilya-m32 marked this pull request as draft November 27, 2023 20:43
@ilya-m32

Copy link
Copy Markdown
Contributor Author

@jonian wdyt if I convert the remaining themes?
​

@ilya-m32
ilya-m32 force-pushed the variable-scale-icon-fix branch from 1fdc74d to dcb6a23 Compare September 1, 2024 12:47
@ilya-m32
ilya-m32 force-pushed the variable-scale-icon-fix branch from dcb6a23 to a9b8b3c Compare September 1, 2024 13:05
@ilya-m32
ilya-m32 force-pushed the variable-scale-icon-fix branch from a9b8b3c to ac85899 Compare October 26, 2024 13:57
@ilya-m32
ilya-m32 marked this pull request as ready for review October 26, 2024 14:06
@ilya-m32

ilya-m32 commented Oct 26, 2024 •

Copy link
Copy Markdown
Contributor Author

Hello @jonian
As we discussed some time ago (#373 (comment)), I updated this PR to make the workaround optional and it can be enabled via extension settings. Let me know what do you think.

image

I tested it locally, but more testing is always welcomed.

@ilya-m32
ilya-m32 force-pushed the variable-scale-icon-fix branch from ac85899 to 9a2d4b5 Compare October 26, 2024 14:16
@jonian

jonian commented Oct 27, 2024

Copy link
Copy Markdown
Member

Hey @ilya-m32, thanks for working on this!

It looks mostly good and the only issue I found is that, if I disable the workaround setting, the icons do not revert to the default (css) mode if I don't also change the theme.

Also I would avoid making some of the code changes in this PR and I will comment on them separately.

Comment thread [email protected]/buttons.js Resolved
Comment thread [email protected]/buttons.js Resolved
Comment thread [email protected]/panel.js Resolved
Comment thread [email protected]/panel.js Resolved
@ilya-m32

Copy link
Copy Markdown
Contributor Author

@jonian thanks for the swift reaction - I applied suggested changes. I also added a callback on configuration change, so it will update the rendering mode without extension/shell restart.

I've noticed that the fix is not pixel perfect but it should be good enough for a temporary workaround in my opinion.

@jonian

jonian commented Oct 27, 2024

Copy link
Copy Markdown
Member

@ilya-m32 looks great, thank you for your contribution!

@jonian
jonian merged commit a3b8c7f into hardpixel:master Oct 27, 2024
@jonian

jonian commented Oct 27, 2024 •

Copy link
Copy Markdown
Member

fix #373
fix #106

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.

2 participants