GTK 4.x
gtk.css
$XDG_CONFIG/gtk-4.0/gtk.css
window {
border-radius: 0;
}
headerbar {
min-height: 0;
padding: 0 2px;
}
headerbar button {
min-width: 16px;
}
headerbar menubutton {
margin: 0;
}
headerbar menubutton button {
margin: 4px;
}
headerbar .start,
headerbar .end {
border-spacing: 0;
}
headerbar .start button,
headerbar .end button {
margin: 2px;
}
headerbar stackswitcher button {
margin: 2px 0;
}
headerbar windowcontrols button {
min-width: 22px;
min-height: 22px;
}
.titlebar {
min-height: 0;
}
Fix font hinting
$XDG_CONFIG/gtk-4.0/settings.ini
[Settings]
gtk-hint-font-metrics=1
gtk-font-rendering=manual
Fix incorrect (libadwaita?) theming
- Install desktop portal backend, e.g.
xdg-desktop-portal-gtk. - Set dconf /org/gnome/desktop/interface/color-scheme value to
prerer-dark([3] will produce errors and render transparent background without this (!)) . - Set empty
GTK_THEMEenvironment variable.
Notes:
- The
/org/gnome/desktop/interface/gtk-themedconf value is expected to be set toArc-Darkand is shared with other GTK versions. - If
GTK_THEMEis set toArc-Darkand [2] is skipped, some applications (e.g. gnome-caluclator, baobab) do render correctly, but some (e.g. celluloid)- don't.