canonical / ubuntu-desktop-installer

Ubuntu Desktop Installer
GNU General Public License v3.0
538 stars 94 forks source link

Shell theme #1243

Closed jpnurmi closed 1 year ago

jpnurmi commented 1 year ago

I selected the dark theme during the installation. Apps are dark, the shell is not.

image

jpnurmi commented 1 year ago

Something overrides gtk-theme:

$ cat /usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override 
[org.gnome.desktop.interface]
color-scheme='prefer-dark'
gtk-theme='Yaru-dark'
jpnurmi@jpnurmi-Standard-PC-i440FX-PIIX-1996:~$ gsettings get org.gnome.desktop.interface gtk-theme
'Yaru'
jpnurmi@jpnurmi-Standard-PC-i440FX-PIIX-1996:~$ gsettings get org.gnome.desktop.interface color-scheme
'prefer-dark'
jpnurmi commented 1 year ago

Not sure why the override wasn't picked up.

/usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override:gtk-theme='Yaru-dark'
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:theme-name = 'Yaru'
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:gtk-theme = "Yaru"
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:icon-theme = "Yaru"
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:cursor-theme = "Yaru"
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:gtk-theme = "Yaru"
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:icon-theme = "Yaru"
/usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override:cursor-theme = "Yaru"

By convention, vendor override files begin with nn_ where nn is a number from 00 to 99. Higher numbered files have higher priority (eg: if the same override is made in a file numbered 10 and then again in a file numbered 20, the override from 20 will take precedence).

jpnurmi commented 1 year ago

The one with the ":ubuntu" selector wins even if it's in a file with a lower priority.

# /usr/share/glib-2.0/schemas/10_ubuntu-settings.gschema.override
[org.gnome.desktop.interface:ubuntu]
gtk-theme = "Yaru"

vs.

# /usr/share/glib-2.0/schemas/20_ubuntu-desktop-installer-interface.gschema.override
[org.gnome.desktop.interface]
gtk-theme='Yaru-dark'