Created attachment 152668 [details] Kickoff custom icon - square (regressed) SUMMARY Non-square landscape-oriented custom icons don't stretch to fill the panel height anymore. It's a regression from 5.25 after recent implementation of custom label support that significantly changed sizing code and is not based on an assumption that icons should always be square (width == height). STEPS TO REPRODUCE 1. Open settings for Application Launcher (Kickoff) applet. 2. Choose some horizontal image as custom icon. 3. Apply. OBSERVED RESULT Icon stays square, squeezed to only be as wide as the panel's height. EXPECTED RESULT Applet should become as wide as needed to fill the icon vertically. Also, on a vertical panel it should become as tall as needed to fill horizontally. In both cases, applet's minimum size should be a square based on the direction opposite to the panel's form factor (so it doesn't become too thin). SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE: git-master Qt Version: 5.15.6 Kernel Version: 5.19.13-arch1-1 (64-bit) Graphics Platform: X11 Processors: 8 × Intel® Core™ i7-6700HQ CPU @ 2.60GHz Memory: 31.3 GiB of RAM Graphics Processor: NVIDIA GeForce GTX 970M/PCIe/SSE2 Manufacturer: ASUSTeK COMPUTER INC. Product Name: G752VT System Version: 1.0
Created attachment 152669 [details] Kickoff custom icon - wide (how it should be)
Created attachment 152670 [details] Simple patch that made that second screenshot possible Naïve patch, probably misses some general applet's Layout.* parts.
Cannot reproduce in 5.25.5 after setting a very wide png
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/1212
Git commit f3cc3ea33f59f627519956225a654cc7f73476e2 by ivan tkachenko. Committed on 25/10/2022 at 11:55. Pushed by ratijas into branch 'master'. applets/kickoff: Reiterate on compact representation sizing code All 4 min/max width/height expressions were combined into one property block for deduplication and code locality. Some helper properties were introduced, others removed as obsolete. Compact icon now does not shrink to a size less than a panel's orthogonal direction, such that is stays at least square or taller (in vertical) / wider (in horizontal form factor). Extra margins are added to the left and right of the label (if present) instead of spacing between it and an icon. Otherwise text looks too sticky to its neighboring widgets IMHO. Test plan: check with and without icons, text on horizontal, vertical panels and on a desktop; in every form factor use icons of different aspect ratio: square, landscape, portrait, and an invalid one (can be set to a valid, then move the icon file and restart plasmashell). M +58 -59 applets/kickoff/package/contents/ui/Kickoff.qml M +0 -14 applets/kickoff/package/contents/ui/code/tools.js https://invent.kde.org/plasma/plasma-desktop/commit/f3cc3ea33f59f627519956225a654cc7f73476e2
i installed plasma-desktop-5.27.0 recently, and I can confirm that icons now stretch to fill the space in the panel. But in my case, that's not desired: I'm using a vertical panel instead of horizontal, that's about 250px wide, and since v5.27.0 the icon stretches to fill the width, and accordingly the height is now so big too. That's not what I want, as this takes up a significant part of my panel, for a huge icon i don't need to be so big. please see attached screenshots, the one with the small icon is kickoff from v5.26.5, the large icon is with kickoff from v5.27.0. git bisect'ing lead me to https://invent.kde.org/plasma/plasma-desktop/-/commit/f3cc3ea33f59f627519956225a654cc7f73476e2 which has a link to this bug, so I thought I post here first, but if this should be a separate bug, I can open one. Unfortunately, this sounds like opposing requirements, once the icon should expand, and once not. I don't know how and don't think this can be decided automatically, so maybe some option would be needed? BTW: kicker from v5.27.0 still has a small icon.
Created attachment 156569 [details] small kickoff icon v5.26.5
Created attachment 156570 [details] large kickoff icon v5.27.0
Christian, that seems like a slightly different issue, and I'm afraid I can confirm that it's intentional now.
(In reply to Nate Graham from comment #9) > Christian, that seems like a slightly different issue, and I'm afraid I can > confirm that it's intentional now. Why do you think it's different? What is intended with this fix, is what I'm experiencing now: stretch the icon to fill out the available space. Only difference is, the direction, horizontally or vertically, but I would expect the behaviour to be direction agnostic except explicitly made different. Haven't looked at it so closely, but could be, idk. I think, it was just overlooked, that the non-stretching behaviour could be valid, too. and IMHO there should both be supported, maybe with an option.
As a workaround you could make yourself an icon which is wide enough for the panel width, and not so tall. So that the new code correctly displays it as a rectangle. But I have to agree, no one thought of extra-wide vertical panels usecase. I see two problems with vertical panels in general: 1. they are often too thin to fit anything. See user switching applet. 2. they are sometimes too wide to handle all the width you give them. like in your case.
(In reply to ratijas from comment #11) > As a workaround you could make yourself an icon which is wide enough for the > panel width, and not so tall. So that the new code correctly displays it as > a rectangle. > > But I have to agree, no one thought of extra-wide vertical panels usecase. I > see two problems with vertical panels in general: > > 1. they are often too thin to fit anything. See user switching applet. > 2. they are sometimes too wide to handle all the width you give them. like > in your case. Yeah, thougt about s.th. like you probosed, but that's quite a hack. I must say, I have used this layout since several years, somewhen since early plasma 4 days. So I can't say, that vertical panels are problematic. Sure, I haven't used all applets in my panel, but those I have used have worked quite well until now, but I guess, there are also applets that don't work too well in a horizontal panel, because they are not intended to be used in a panel. What would be about a setting (check box), where you can select yourself, if you want the icon to expand or not? On the other hand, should all applets that have a icon like this, have this setting? Would lead to code duplication... What about the panel? Could it have a setting, that says "all my child applets expand" or "...applets don't expand"? Don't know much about qml, so I don't even know if this would be possible. So, I see that's not straightforward, but I would really hate, if this would "break" after all these years. On the other hand, I'm aware, that this use case is not widespread, but would really like if a solution can be found.
Actually, the workaround with the wide and not so tall icon doesn't work. the space for is still the square, so as high as width. Attached screenshot and image i used
Created attachment 156649 [details] screenshot with wider than tall icon
Created attachment 156650 [details] wider than tall icon
So, I'm out of luck here?
cs, your issue is something else. It's a combination of two things: 1. Your panel icon is too small because the panel icon size has been set to a very low size in the Icons KCM in the past. 2. We made panel icons remain square even for very thick vertical panels, which was intentional and tracked by Bug 466566. You can remove the panel icon size from your ~/.configkdeglobals file to make the icon itself fit in the box for it at that thick panel size.
Hm, sorry, I don't know what you recommend me to do: 1) I can't find anything in KCM regarding panel icon size 2) I can't find anything in ~/.config/kdeglobals regarding panel icon size 3) AFAIK, panel configuration is in ~/.config/plasma-org.kde.plasma.desktop-appletsrc, so I checked there, too, but couldn't find there anything relading to panel icon size, too 4) I couldn't find documentation for the entries in these config files. Could you please elaborate, what I need to change? Or do you have some reference to a documentation, where I can look this up myself? And actually, my problem isn't that the icon is too small, it's too big (high/tall). BR, cs
Look in your ~/.kdeglobals file for a group named [PanelIcons]. Delete that line and the line below it. If that file has no such lines in it, try looking in /etc/xdg/kdeglobals, if it exists.
(In reply to Nate Graham from comment #19) > Look in your ~/.kdeglobals file for a group named [PanelIcons]. Delete that > line and the line below it. > > If that file has no such lines in it, try looking in /etc/xdg/kdeglobals, if > it exists. ~/.config/kdeglobals doesn't contain [PanelIcons] group /etc/xdg/kdeglobals doesn't exist at all
Not sure how to troubleshooing further, sorry. Regardless, your issue is something other than the one originally described here, so let's not keep using this bug report for it. :)