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

[BUG] inconsistent icon size #1266

Open
3 tasks done
mageOfstructs opened this issue Jan 4, 2025 · 4 comments
Open
3 tasks done

[BUG] inconsistent icon size #1266

mageOfstructs opened this issue Jan 4, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@mageOfstructs
Copy link

Checklist before submitting an issue

  • I have searched through the existing closed and open issues for eww and made sure this is not a duplicate
  • I have specifically verified that this bug is not a common user error
  • I am providing as much relevant information as I am able to in this bug report (Minimal config to reproduce the issue for example, if applicable)

Description of the bug

icons aren't equally sized, even when apps provide a .svg

Reproducing the issue

(defwindow bar
  :monitor 0 ;; Optional for X11
  :stacking "fg"
  :exclusive true
  :geometry (geometry
              ;; :width "1550px"
	      :width "98%"
              :height "3%"
	            :y "1%"
	            :anchor "top center")
  (box
    (for iconName in {["org.xfce.thunar", "librewolf"]}
      (image :icon {iconName}
             :icon-size "large-toolbar"
      )
    )
  )
)

Expected behaviour

Icons should be the same size

Additional context

No response

Platform and environment

OS: archlinux
WM: hyprland 0.46.0 (wayland)
eww 0.6.0 6ee1667

@mageOfstructs mageOfstructs added the bug Something isn't working label Jan 4, 2025
@andi242
Copy link

andi242 commented Jan 4, 2025

thanks for the hint! I was looking for a way to display icons from themes :)

I can confirm the behaviour, though. image-width/image-height seem to have no effect either.
I was able to get a consistent icon size with switching icon themes (eww inspector > visual > icon theme).
PlasmaXDark was different sizes while kora was consistent.

so perhaps it's not something eww related?

applying scss did not do anything to the icons.

@mageOfstructs
Copy link
Author

Huh, my icon theme isn't even recognized by the inspector. Switching it to anything else fixes the issue mostly, however thunar still doesn't play along. This seems more and more like a gtk issue.

@andi242
Copy link

andi242 commented Jan 5, 2025

I tried to apply icon sizes via ~/.config/gtk-3.0/settings.ini (and in gtk-4.0), which would not work either.

gtk docs say to do:

[Settings]
gtk-icon-sizes=gtk-large-toolbar=12,12:gtk-dialog=48,48

which should change icon sizes on large-toolbar
...no change in sizes, no matter what.

/edit

uh... changing :icon-size from large-toolbar to dialog in the for statement, did equal sizes on every icon. 👀

@mageOfstructs
Copy link
Author

It must be somewhat dependent on the icon theme too. changing icon-size to dialog does make it better, except for the cinny logo (see image).
2025-01-12-202211_hyprshot

Cinny also only provides three icons from what I can tell: one 32x32, one 128x128 and one 256x256. Maybe it can't scale them down? Could explain why larger icon-sizes seem to not have this issue as much as the smaller ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants