mate-desktop / marco

MATE default window manager
https://mate-desktop.org
GNU General Public License v2.0
198 stars 87 forks source link

Titlebars fail to resize when changing font DPI #493

Open rathann opened 5 years ago

rathann commented 5 years ago

This was originally reported against mate-control-center: https://github.com/mate-desktop/mate-control-center/issues/261 , but it looks like the issue might be in marco after all. See also: https://github.com/mate-desktop/caja/issues/1219 .

Expected behaviour

marco should display all window title bars with correct font size without having to run marco --replace after changing font sizes and DPI rendering settings.

Actual behaviour

The font size in title bars is too large or too small after switching between 160DPI and 96DPI screens and adjusting font size.

Steps to reproduce the behaviour

  1. Start MATE 1.20 on a 13" laptop with a 1920x1080 internal screen (~160DPI). Set the following settings:

    gsettings set org.mate.font-rendering dpi 168.0
    gsettings set org.mate.interface document-font-name 'Sans 8'
    gsettings set org.mate.interface font-name 'Sans 8'
    gsettings set org.mate.interface monospace-font-name 'Monospace 8'
    gsettings set org.mate.Marco.general titlebar-font 'Sans Bold 8'
    echo "Xft.dpi: 168" | xrdb -merge
    dconf write /org/mate/desktop/font-rendering/dpi 168.0

    Log out and log back in. Fonts should be large enough to read comfortably. See: https://bugzilla.redhat.com/attachment.cgi?id=1223059

  2. Connect a 24" (~96DPI) monitor (or similar) with similar pixel resolution, set it up as the only screen and and set the following settings:

    gsettings set org.mate.font-rendering dpi 96.0
    gsettings set org.mate.interface document-font-name 'Sans 10'
    gsettings set org.mate.interface font-name 'Sans 10'
    gsettings set org.mate.interface monospace-font-name 'Monospace 10'
    gsettings set org.mate.Marco.general titlebar-font 'Sans Bold 10'
    echo "Xft.dpi: 96" | xrdb -merge
    dconf write /org/mate/desktop/font-rendering/dpi 96.0

    Without logging out and back in or running marco --replace, the title bar fonts are too large, see: https://bugzilla.redhat.com/attachment.cgi?id=1223057 . It should look like this instead: https://bugzilla.redhat.com/attachment.cgi?id=1224192 .

If you do the above in the reverse order (i.e. start with 96DPI screen and switch to 160DPI screen) then the title bar font size will be too small.

marco --replace seems to work around the issue without having to log out and back in.

MATE general version

1.20.4

Package version

marco-1.20.3

Linux Distribution

Fedora 29

Link to downstream report of your Distribution

https://bugzilla.redhat.com/show_bug.cgi?id=1397700

vkareh commented 5 years ago

Reposting from bugzilla:

So the issue here seems to be that marco is not responding correctly to changes in font DPI, and so requries a replace/restart. Changing to a monitor with different resolution just seems to be what triggers the visibility of this bug. Both marco and caja seem to be affected by this.

vkareh commented 5 years ago

Note to self: remove this code when this is fixed.