Talk:GTK
Adwaita GTK 2 colors do not match GTK 3
It seems like gnome-themes-extra is not updated anymore, and Adwaita GTK 3 colors changed since 3.28. In GNOME GitLab there's a merge request that has the updated colors for Adwaita GTK 2. It could be used like this:
$ git clone https://gitlab.gnome.org/GNOME/gnome-themes-extra.git && cd gnome-themes-extra $ curl -O https://gitlab.gnome.org/GNOME/gnome-themes-extra/-/merge_requests/8.patch $ git apply 8.patch $ mkdir -p ~/.themes/ $ cp -r themes/* ~/.themes/
But I'm not sure it belongs to here. Should it be included in the article as a workaround? -- Veemo (talk) 17:12, 20 October 2020 (UTC)
Wayland clientside decorations
Unfortunately the package mentioned in GTK#Wayland_backend has been removed, it seems to have been merged upstream. However there is gtk3-nocsd-gitAUR, but I do not know how relevant it is for Wayland users. Consider updating the section.
NetSysFire (talk) 21:35, 5 February 2021 (UTC)
GTK_CSD=0
can only disable CSD on windows that do not have custom CSD decorations widgets. I removed tip completely as it may be misleading. -- Svito (talk) 15:40, 30 April 2021 (UTC)
gtk-4.0/settings.ini
There is no mention of where to change settings for Gtk 4, or what settings differ from Gtk 3. At least a hint to copy .config/gtk-3.0/settings.ini to .config/gtk-4.0/settings.ini would be helpful. Tim.dolores (talk) 14:41, 3 December 2021 (UTC)
- I thought that GTK4 settings are hardcoded and only can be changed through available options in dconf editor.
- If you have tested this method, and if this works as intended, we have to add it into article.
- I personally did it and test it for a few days to see how it works.
- However, just coping gtk-3
settings.ini
file into gtk-4 one doesn't seem to be suitable. since many settings options of GTK3 do not exist for GTK4 and hence are not valid.[1]gtk-key-theme-name
is an example.
- Arash (talk) 04:43, 19 March 2024 (UTC)
- I actually had to do this recently. Pavucontrol seems to have updated from GTK 3 to GTK 4 and my dark mode stopped working with it. I tried all the ways the article recommended to fix the selected theme but what ended up working for me was a random youtube video where someone copied their gtk-3.0 folder to gtk-4.0. When I launch Pavucontrol i get the warnings about some of the key names not being used anymore, but that fixed the dark theme not being used when none of the other commands or settings did, so I definitely think it's worth mentioning that gtk-4.0 can exist and can be configured there. Can't confirm whether or not this behavior is unintended or not, but I can confirm that gtk-4.0/settings.ini works. ViperZer0 (talk) 06:44, 27 May 2024 (UTC)
Why are my gsettings
settings not in sync with the configuration files?
Does anyone have a clue why gsettings get org.gnome.desktop.interface font-name
is Cantarell 11
when my I have Noto Sans
in my config?
.config/gtk-3.0/settings.ini
gtk-font-name=Noto Sans 11
There are a bunch of font settings, that also use the Cantarell font, which I never wrote in my config. Some programs are picking up on them instead of from the config file. I would have to sync the two manually.
Does this happen to anyone else? If settings.ini
is useless the article should be changed, I think. Affaisseras (talk) 23:25, 9 March 2024 (UTC)
- GTK3 has two sorts of separate configuration paths. One is respected by some apps and the other respected by the other ones (usually gnome system apps; with no exact defenition!) so you have to use both
.config/gtk-3.0/settings.ini
andgsettings set org.gnome.desktop.interface
to configure your GTK3 stuff. - It's kind of mentioned in article's Basic theme configuration section.
- GTK3 has two sorts of separate configuration paths. One is respected by some apps and the other respected by the other ones (usually gnome system apps; with no exact defenition!) so you have to use both
- Arash (talk) 04:27, 19 March 2024 (UTC)
- For emphasis, "I would have to sync the two" might be misinterpreted in a way that downplays the issue, it doesn't mean the minor hassle of having to set one setting entry twice, it means having to sync two locations for configuration that each have dozens of settings.
- Thanks for confirming that my setup is working normally. If GTK normally has two separate systems for configuration, passing mentions of "if this doesn't work try gsettings" on some sections, in other sections only mentioning gsettings but not settings.ini and vice versa, make an unsure article. The alternate systems should be explicitly explained once (probably in Configuration), and any prompt in the article to change a GTK setting should refer to the section, because GTK settings are complicated unfortunately.
- Some observations about syncing
settings.ini
and "gsettings"- You can use a shell script that reads settings.ini to sync some common settings (from SwayWM Wiki)
- However, the script does not enable to you forget about syncing settings entries. You might be surprised that the script is only syncing a few names. Why not just sync all entries in the file?
- Indeed, applying gsettings programmatically is not difficult. You can batch gsettings set commands as the script does, you can write files of overrides of gsettings defaults, set defaults per user through an alternative method, you can even dump and load settings with dconf as .ini files
- The two systems often use similar, but different names for similar settings. Despite the flexibility, that's the nail in coffin of syncing the configurations. While gsettings knows
font-name
, settings.ini calls itgtk-font-name
. Could it be just a change of prefix? Nope,gtk-key-theme
andgtk-key-theme
are called the same, making the naming irregular.gtk-decoration-layout
seems to not be inorg.gnome.desktop.interface
as the settings mentioned so far but(...).wm.preferences
, with the new namebutton-layout
. You can see the differences for yourself, the name definitions for settings.ini are found in the Gtk.Settings documentation, and for gsettings (which is the Gio.Settings interface), the names and defaults are found in/usr/share/glib-2.0/schemas/
- I've never developed for GTK, but it seems these systems are entirely separate, with incompatible key names. It would explain why we've seen programs use Gtk.Settings or Gio.Settings, but not both.
- Affaisseras (talk) 19:39, 20 March 2024 (UTC)
Broadway backend for gtk4
Starting the broadway backend is different in gtk4. This in gtk3:
$ broadwayd $display_number
is this in gtk4:
$ gtk4-broadwayd $display_number
Source: https://docs.gtk.org/gtk4/broadway.html -- Libinator (talk) 08:56, 17 June 2024 (UTC)