lxqt / lxqt-session

The LXQt session manager
https://lxqt.github.io
GNU Lesser General Public License v2.1
57 stars 52 forks source link

Added an option for screen scaling #408

Closed tsujan closed 2 years ago

tsujan commented 2 years ago

Let's have a minimal option for screen scaling and talk about probable better options later. It just sets QT_SCALE_FACTOR and GDK_SCALE to a value between 1.0 and 4.0 (greater factors don't seem useful and might cause trouble if chosen by mistake).

Closes https://github.com/lxqt/lxqt/issues/2173 and closes https://github.com/lxqt/lxqt-config/issues/402

stefonarch commented 2 years ago

Tested with x2 but it looks like 4x ;) The arrows jump from 1.00 to 2.00 directly, finetuning by steps of 0.20 or similar is possible, to avoid manually editing numbers?

tsujan commented 2 years ago

finetuning by steps of 0.20 or similar is possible, to avoid manually editing numbers?

Will make it 0.5; less that it isn't recommended (by Qt?), although it works under most circumstances.

I should also make another change, so that changing the value takes effect only on closing the dialog (currently, it takes effect when the spin-box loses focus). Will leave a comment when ready.

tsujan commented 2 years ago

Done. I think it's more logical now.

tsujan commented 2 years ago

Please also note that this is about a global scale factor, that's independent of screens (yet another reason why it should be in Session Settings). Per-screen scaling is a complex job that should be done separately, in Monitor Settings, and I'm not sure if it can be done well for X11 (see https://doc.qt.io/qt-6/highdpi.html#configuring-x11) — to say nothing of GTK apps.

tsujan commented 2 years ago

I changed the name to "Global Screen Scaling" to prevent misunderstandings.

tsujan commented 2 years ago

Any objection to merging? It's like this:

scaling