Bug 391904 - Icon scaling on title bar context menu do not obey HiDPI settings or PLASMA_USE_QT_SCALING
Summary: Icon scaling on title bar context menu do not obey HiDPI settings or PLASMA_U...
Status: RESOLVED DUPLICATE of bug 372012
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-15 23:51 UTC by battaglia01
Modified: 2018-03-16 17:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
kde: Wayland-
kde: X11+


Attachments
Composite screenshot of two context menus, HiDPI scaling (2.0) only obeyed on one -- PLASMA_USE_QT_SCALING=true set (1.22 MB, image/png)
2018-03-15 23:51 UTC, battaglia01
Details
Weird default sizing in KWin (2.57 MB, image/png)
2018-03-16 17:11 UTC, battaglia01
Details

Note You need to log in before you can comment on or make changes to this bug.
Description battaglia01 2018-03-15 23:51:48 UTC
Created attachment 111425 [details]
Composite screenshot of two context menus, HiDPI scaling (2.0) only obeyed on one -- PLASMA_USE_QT_SCALING=true set

I'm running Manjaro KDE Plasma 5.12.10, Qt 5.10.1. I'm not sure exactly what KWin version that is, but it's whatever one comes default with the above.

The attached screenshot is a "composite" with two context menus showing: that of the window titlebar, and that of the desktop. In the screenshot, I have PLASMA_USE_QT_SCALING=true.

You can see that the icons in the desktop context menu are scaled properly in accordance with the PLASMA_USE_QT_SCALING environment variable, but that those of the window context menu are not.

Is there another environment variable that governs the scaling behavior for window context menus?
Comment 1 Martin Flöser 2018-03-16 05:13:06 UTC
@David: any ideas?
Comment 2 Kai Uwe Broulik 2018-03-16 10:13:21 UTC
PLASMA_USE_QT_SCALING is honored by plasmashell where it enables Qt scaling (does not qunsetenv the variables) and is used on Wayland.

For KWin consensus was that Qt's scaling interferes with Kwin's coordinate system too much to be feasible, right?
Comment 3 Martin Flöser 2018-03-16 15:13:21 UTC
(In reply to Kai Uwe Broulik from comment #2)
> For KWin consensus was that Qt's scaling interferes with Kwin's coordinate
> system too much to be feasible, right?

I think nobody ever tried, but I imagine things like icons to just break if we would enable it.
Comment 4 David Edmundson 2018-03-16 15:39:18 UTC
Works in wayland.

> For KWin consensus was that Qt's scaling interferes with Kwin's coordinate system too much to be feasible, right?

Yeah, for Plasma I allowed a user override, rather than just doing it on platform as it was 90% fine. 

It's not so much about icons, but on X Qt would convert any setGeometry on internal windows from user pixels to device pixels. 

We'd end up with 3 completely different scaling systems. 
 - Plasma scaling: resizing native pixel sizes to fonts
 - Qt's scaling: doing everything in normalised pixels 
 - Kwin's wayland scaling: effectively the same as Qt

All intertwined and conflicting.
Huge effort for a very minor bug. I would reject any patches that tried.

Only possible half-gap we could do is do a bodge making QStyle icon sizes bigger (plasma scaling style) in the kwin case.

*** This bug has been marked as a duplicate of bug 372012 ***
Comment 5 battaglia01 2018-03-16 17:11:24 UTC
Created attachment 111447 [details]
Weird default sizing in KWin

Thank you! I guess I'll wait for Wayland to get more stable.

I was also going to note that some windows are sized oddly by default on HiDPI, such as the system settings window. (See attachment)

Of course, resizing fixes this, so this refers only to the default scaling. I'm not sure if this is a problem with component layout not following the DPI settings, or if it's just a problem with window sizes.

I was going to make another bug report about this, but now I'm wondering, would this be the same issue - that KWin window sizes follow a different geometry spec?