lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
193 stars 135 forks source link

Fancy Menu: Problem with Breeze and HiDPI scaling #2077

Open libalis opened 4 months ago

libalis commented 4 months ago

menu

Expected Behavior

The buttons should scale.

Current Behavior

The buttons are way too big.

Steps to Reproduce (for bugs)

I have a 14 inch laptop with a resolution of 3840x2160p. My font settings: font My session settings: session session2 My /etc/sddm.conf.d/sddm.conf file:

[General]
HaltCommand=/usr/bin/systemctl poweroff
InputMethod=
Namespaces=
Numlock=none
RebootCommand=/usr/bin/systemctl reboot

[Autologin]
Relogin=false
Session=
User=

[Theme]
Current=sugar-candy
CursorTheme=Breeze_Light
DisableAvatarsThreshold=5
EnableAvatars=true
FacesDir=/usr/share/sddm/faces
Font=Roboto
ThemeDir=/usr/share/sddm/themes

[Users]
DefaultPath=/usr/local/sbin:/usr/local/bin:/usr/bin
HideShells=
HideUsers=
MaximumUid=60513
MinimumUid=1000
RememberLastSession=true
RememberLastUser=true
ReuseSession=true

[Wayland]
EnableHiDPI=true
SessionCommand=/usr/share/sddm/scripts/wayland-session
SessionDir=/usr/share/wayland-sessions
SessionLogFile=.local/share/sddm/wayland-session.log

[X11]
DisplayCommand=/usr/share/sddm/scripts/Xsetup
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
EnableHiDPI=true
MinimumVT=1
ServerArguments=-nolisten tcp
ServerPath=/usr/bin/X
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/share/xsessions
SessionLogFile=.local/share/sddm/xorg-session.log
UserAuthFile=.Xauthority
XauthPath=/usr/bin/xauth
XephyrPath=/usr/bin/Xephyr

(See EnableHiDPI=true)

Context

Everything works, it just looks unusual.

System Information
tsujan commented 4 months ago

Your screenshot doesn't show that there's a scaling factor > 1. Are you sure that there's any scaling? Which LXQt theme do you use?

tsujan commented 4 months ago

If your scale factor is 1.5, then the size of those buttons is correct. Their icon size (PM_LargeIconSize) is 32px in most styles, and with a scale factor of 1.5 we have 32×1.5=48.

stefonarch commented 4 months ago

It looks like an issue with breeze widget style while with fusion is all fine:

immagine

Note: when changing widget style the panel needs to be restarted.

libalis commented 4 months ago

Interesting, any idea why this might be?

libalis commented 4 months ago

Your screenshot doesn't show that there's a scaling factor > 1. Are you sure that there's any scaling? Which LXQt theme do you use?

Yes, there is definitely scaling. The theme is called system.

tsujan commented 4 months ago

It looks like an issue with breeze widget style while with fusion is all fine:

I don't see any difference in the button size in your screenshot. Its icon is also 48px, which is correct with a scale factor of 1.5.

The theme is called system.

Then it uses the widget style, which is Breeze in your case. As I said, I don't see any issue here if your scale factor is 1.5.

stefonarch commented 4 months ago

Actually the system theme combined with breeze widget style has still the issue with text not elided in taskbar buttons and should be unusable: immagine

stefonarch commented 4 months ago

It looks like an issue with breeze widget style while with fusion is all fine:

I don't see any difference in the button size in your screenshot. Its icon is also 48px, which is correct with a scale factor of 1.5.

Using breeze widget the icons appear huge; there is no scale factor.

breeze: immagine

fusion:

immagine

tsujan commented 4 months ago

Actually the system theme combined with breeze widget style has still the issue with text not elided in taskbar buttons

That's a Breeze issue we know about for a long time (sorry, didn't have time to find the link) and isn't related to this report. The Breeze devs know about it too but, for whatever reason, they didn't want to see it as an issue, although I showed to them where the problem was in their code.

All in all, everything seems OK to me regarding the button size if the scale factor is 1.5.

stefonarch commented 4 months ago

see above,no scale factor nowhere here, except breeze which scales up those icons.

tsujan commented 4 months ago

there is no scale factor.

Now I am confused ;) @libalis says there is definitely a scale factor, while you say there isn't. Have I misread a comment?

libalis commented 4 months ago

I have deactivated sddm scaling and explicitly set lxqt to 2x scaling. Fusion: Bilder-2024-07-16-21-38-34 Breeze: Bilder-2024-07-16-21-39-48

libalis commented 4 months ago

So it is related to breeze and even occurs without scaling according to @stefonarch.

tsujan commented 4 months ago

Yes, in your last screenshots and considering your last info, Fusion is OK (64px), while breeze isn't (96px).

tsujan commented 4 months ago

It should be related to a bug in KDE.

I vaguely remember that, when KDE6 came out, @stefonarch told me that its default scaling was 1.5. Now, Breeze may take it directly from KDE settings (which is a bug), such that, with a scale factor of 2, those icons have a size of 32×2×1.5=96px.

libalis commented 4 months ago

Do they know about this bug?

tsujan commented 4 months ago

I don't know. They denied the obvious bug that @stefonarch mentioned (and whose link I can't find); so, I'm not sure anything will happen if they know about this one. I think they're happy as far as Breeze works fine only in KDE.

libalis commented 4 months ago

So sad

tsujan commented 4 months ago

Ah, at last I found it: https://github.com/lxqt/lxqt/issues/1525#issuecomment-406907067

It was denied in https://bugs.kde.org/show_bug.cgi?id=397337

libalis commented 4 months ago

If I get around to it tomorrow, I'll try to report it to breeze.

tsujan commented 4 months ago

OK, I found some time to check it firsthand. These screenshots show those buttons with Breeze and System theme, with scale factors of 1 and 1.5, respectively:

breeze-1

breeze2

As you can see, the icon size is correct: it's 32px with no scale factor and 48px with a scale factor of 1.5.

I have a full KDE installation, and I remember that I had to change a wrong setting somewhere in its systemsettings when it was upgraded to its version 6. Sadly, I don't remember what that setting was.

So, the problem can be worked around by finding and fixing that setting. It may be in its Display Configuration → Global scale (mine is 100%), but I'm not sure if it can be set outside Plasma6.

libalis commented 4 months ago

Unfortunately, I'm not sure if I did everything correctly, but the issue is now also on KDE bugs: https://bugs.kde.org/show_bug.cgi?id=490420

tsujan commented 4 months ago

Did you check systemsettings → Configuration → Global scale?

libalis commented 4 months ago

Sadly systemsettings doesn’t work for me.

libalis commented 4 months ago

"The QStyle does define some icon sizes: QStyle::PM_SmallIconSize QStyle::PM_LargeIconSize

Nothing seems related to scaling, it's just a different default."

tsujan commented 4 months ago

I know that you quoted it from your KDE report.

QStyle::PM_LargeIconSize is 32 in Breeze, as it is in Fusion. Those big icons with Breeze should have another explanation.

libalis commented 4 months ago

I am probably not qualified to continue the discussion on KDE bugs.

tsujan commented 4 months ago

I am probably not qualified to continue the discussion on KDE bugs.

In a sense, I'm neither ;)

tsujan commented 4 months ago

@libalis, I think this is worth a try:

Open ~/.config/kdeglobals and serach in it for [DialogIcons]. Under it, check whether Size=... exists and set it to Size=32. Then restart lxqt-panel from Session Settings.

If [DialogIcons] doesn't exist, add this to that file:

[DialogIcons]
Size=32
libalis commented 4 months ago

I didn't even have the file and unfortunately this didn't change anything for me. Maybe it works for @stefonarch?

stefonarch commented 4 months ago

No effect here, I had the file but not the entry.

libalis commented 4 months ago

Too bad.

tsujan commented 4 months ago

No effect here, I had the file but not the entry.

Right. that's because KDE6 removed setting of icon sizes (see https://pointieststick.com/2023/07/26/what-we-plan-to-remove-in-plasma-6/ and https://invent.kde.org/plasma/plasma-desktop/-/issues/58).

Something is wrong with Breeze. I don't know why in my case the icon size is that of Fusion. As for config files, KDE has created a total mess inside ~/.config, as if that folder belongs to it.

IMO, this report can be closed.

libalis commented 4 months ago

Sounds understandable, I'm afraid.