Skip to content

Fix inconsistent icon sizes in treebrowser #1416

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

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

Conversation

chrisgoldberg1
Copy link

The treebrowser plugin displayed content-type specific icons at their native resolution, causing some file types (like CSS) to appear with oversized icons. This patch ensures all icons are consistently sized.

The treebrowser plugin displayed content-type specific icons at their
native resolution, causing some file types (like CSS) to appear with
oversized icons. This patch ensures all icons are consistently sized.
Copy link
Member

@b4n b4n left a comment

Choose a reason for hiding this comment

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

You probably should rather use the GTK_ICON_LOOKUP_FORCE_SIZE flag for the gtk_icon_theme_lookup_by_gicon() calls than reimplementing this manually. Unless it doesn't work somehow?

@chrisgoldberg1
Copy link
Author

My GTK and C knowledge isn't advanced enough to implement this in a different way. It just annoyed me that CSS files have had a large icon for years, so I fixed it this way (at least for myself) since I primarily and gladly use the Geany editor (I'm not a fan of Electron-based applications).

Of course, you're free to correct it, and I'd appreciate it if you could find the time to do so. I also made another plugin that converts spaces to tabs when pasting code, in case you're interested.

b4n added a commit to b4n/geany-plugins that referenced this pull request Mar 19, 2025
Force using the same icon size for all file types even if the theme in
use doesn't have the requested size to avoid varying icon sizes.

Closes geany#1416.
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