Closed muerwre closed 11 months ago
Icon height like the "Album art scaling" option?
Vertical padding to off center the album art up or down?
I'm not sure what you mean.
@Moon-0xff, sorry, updated the issue description. The idea is to make cover look like other panel elements, like having margins and, maybe, a little border rounding.
Thanks for the visual aid! It looks like you want to reduce the value of the "Album art scaling" option. The default value is 60% to match with other elements in the panel, looks like yours is set to 100%.
And I like the idea of rounded corners, but I don't know if there's a good way of adding them (perhaps with CSS?).
For me scale (now set to 50) only changes horizontal space around it (I'm on gnome-shell 44.3 btw). Rounding could be done with border-radius in CSS, but it's not as easy as I thought at first.
UPD: fixed height by changing Player.getArtUrlIcon to:
this.albumArt = new St.Icon({
gicon: Gio.Icon.new_for_string(url),
style_class: 'system-status-icon',
icon_size: size - 8, // <-- here
style: "padding: 0; border-radius: 10px;" // <-- sadly doesn't work :-(
})
I suppose we should decrease the minimum allowed value of the "Album art scaling" option then.
What you are doing there is decreasing the value that "Album art scaling" sets by 8 pixels more (less?). Basically:
icon_size: Math.floor(Main.panel.height*50/100) - 8;
The 50 comes from the "Album art scaling" setting.
It might be helpful to know what's your panel height. Can you run this command on the looking glass evaluator and show me the output?
>>> Main.panel.height
To open looking glass:
Alt+F2
or whatever your "run command" shortcut islg
It might also be helpful to know the output of the entire thing. It might just be that 44 does math differently. Please also run and show:
>>> Math.floor(Main.panel.height*50/100) - 8
Can you run this command on the looking glass evaluator and show me the output?
It's 64px, default for Manjaro gnome built-in theme, which is based in default, I suppose (?)
Math.floor(Main.panel.height*50/100) - 8
It's 24px
Helpful! Math is the same. I don't know why the percentage needs to be so low but in any case we only need to decrease the minimum value of "Album art scaling" to solve this.
I will push an update soon enough. You will need to choose 39% to get the same value when the update comes:
Math.floor(64 * 39 / 100)
Fix is already in main
, just a one line diff.
I will update the extension when I have something else to add, I don't like to push small updates.
Thanks for raising this issue! I will close this when the next update is live.
Thanks, it works as expected! (on this picture I've tried to figure out how to make round corners on St.Icon, sadly without any luck, so, don't look at the red artifacts around it).
For sure I would love to know if you get the rounded borders working!
Update is live. Thanks again!
Please, add setting to customize icon height (or vertical paddings), so album cover won't take 100% of panel height.