Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GKD_SCALE useless for fractional scaling #541

Open
stefonarch opened this issue Sep 13, 2024 · 3 comments · May be fixed by #542
Open

GKD_SCALE useless for fractional scaling #541

stefonarch opened this issue Sep 13, 2024 · 3 comments · May be fixed by #542

Comments

@stefonarch
Copy link
Member

stefonarch commented Sep 13, 2024

Playing with fractional scaling I noticed that firefox and GTK3 apps in general don't scale if not set to 2 or 3. A value in lxqt-config-session of 1.22 will be produce env vars like

GDK_SCALE=1.15
QT_SCALE_FACTOR=1.15

where the first just does nothing, resulting in GTK applications not upscaled.

Expected Behavior

Global Scale Factor should be global

Current Behavior

If not set to an integer GTK apps are not affected at all.

Possible Solution

Replace GDK_SCALE= with GDK_DPI_SCALE

Steps to Reproduce (for bugs)
  1. Set global scale factor to 1.2

  2. Relogin and open any GTK app

  3. In Session Settings→ Advanced change GDK_SCALE=1.2 to GDK_DPI_SCALE=1.2

  4. Restart session and check GTK apps.

                               -
    
System Information
  • Distribution & Version: 1.4, 2.0, git, any
@tsujan
Copy link
Member

tsujan commented Sep 13, 2024

What's GTK? Never heard of it ;)

@stefonarch stefonarch linked a pull request Sep 13, 2024 that will close this issue
@tsujan
Copy link
Member

tsujan commented Sep 15, 2024

GDK_DPI_SCALE (fractional) is only for fonts, while GDK_SCALE (integer) is for everything. The first can be set to 0.5 with a value of 2 for the second. Apparently, GDK_SCALE works only on X11. All in all, it's a mess. See https://docs.gtk.org/gtk3/x11.html

We already know that QT_SCALE_FACTOR doesn't work very well under Wayland either. So, the "Global Screen Scaling" is mainly for X11, with the above-mentioned limitation of GTK (= only the integer part is applied).

@tsujan
Copy link
Member

tsujan commented Sep 15, 2024

More on this:

Qt successfully dealt with something that GTK avoided (https://gitlab.gnome.org/GNOME/gtk/-/issues/4345), namely, fractional scaling. It isn't (and can't be) ideal, but it works well for most.

As Qt users, we know that scaling is for everything in the GUI: fonts, icons, radii of rounded corners, thicknesses of lines,… Even QT_FONT_DPI has the same effect, although it's supposed to be only about fonts (try QT_FONT_DPI=200 APP).

Since what GNOME does has never been normal after its version 3, I think we don't need to torture ourselves because of GTK and its settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants