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

[FEATURE] Treat Icons the same as image paths #1292

Open
LurkAndLoiter opened this issue Mar 7, 2025 · 0 comments
Open

[FEATURE] Treat Icons the same as image paths #1292

LurkAndLoiter opened this issue Mar 7, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@LurkAndLoiter
Copy link

Description of the requested feature

regarding issue 1266 where lacking variance in icon sizes can result in irregular icon size outputs. This does not seem to be the case when we use hard links and then use the image-{width,height} properties.

Is there any reason we could not treat the icons the same as image hardlinks when we include a image-{width,height} property or even just in general use? I'm unaware of any underlying trade offs to this approach so forgive my naivety if there is some.

Proposed configuration syntax

No response

Additional context

❯ find /usr/share/icons/ -name "*discord*"
/usr/share/icons/hicolor/256x256/apps/discord.png
❯ find /usr/share/icons/ -name "*CMake*"
/usr/share/icons/hicolor/128x128/apps/CMakeSetup.png
/usr/share/icons/hicolor/32x32/apps/CMakeSetup.png
(defwidget _applications []
  (scroll 
    :vscroll true
    :hscroll false
    :vexpand true
    ; :space-evenly true
    (box 
      :orientation "v"
      :space-evenly false
      (box :space-evenly false
         (image
           :path "/usr/share/icons/hicolor/128x128/apps/CMakeSetup.png"
           :image-width 50 
           :image-height 50)
         (image
           :path "/usr/share/icons/hicolor/256x256/apps/discord.png"
           :image-width 50 
           :image-height 50))
      (for row in listOfApplications
        (box 
          :orientation "h"
          :halign "start"
          :space-evenly false
          (for app in row
            (box
              :class "btns-box"
              (button 
                :tooltip "${app.Name}"
                :onclick "${app.Exec} &"
                (image 
                  :halign "center"
                  :valign "center"
                  :icon "${app.Icon}" 
                  :icon-size "dialog")))))))))

Image

@LurkAndLoiter LurkAndLoiter added the enhancement New feature or request label Mar 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant