Settings
GtkSettings
provides a mechanism to share global settings between applications.
On the X window system, this sharing is realized by an XSettings manager that is usually part of the desktop environment, along with utilities that let the user change these settings.
On Wayland, the settings are obtained either via a settings portal, or by reading desktop settings from class@Gio.Settings.
On macOS, the settings are obtained from NSUserDefaults
.
In the absence of these sharing mechanisms, GTK reads default values for settings from settings.ini
files in /etc/gtk-4.0
, $XDG_CONFIG_DIRS/gtk-4.0
and $XDG_CONFIG_HOME/gtk-4.0
. These files must be valid key files (see GKeyFile
), and have a section called Settings. Themes can also provide default values for settings by installing a settings.ini
file next to their gtk.css
file.
Applications can override system-wide settings by setting the property of the GtkSettings
object with g_object_set(). This should be restricted to special cases though; GtkSettings
are not meant as an application configuration facility.
There is one GtkSettings
instance per display. It can be obtained with func@Gtk.Settings.get_for_display, but in many cases, it is more convenient to use method@Gtk.Widget.get_settings.
Skipped during bindings generation
method
gtk-alternative-button-order
: Property has no getter nor settermethod
gtk-alternative-sort-arrows
: Property has no getter nor settermethod
gtk-application-prefer-dark-theme
: Property has no getter nor settermethod
gtk-cursor-aspect-ratio
: Property has no getter nor settermethod
gtk-cursor-blink
: Property has no getter nor settermethod
gtk-cursor-blink-time
: Property has no getter nor settermethod
gtk-cursor-blink-timeout
: Property has no getter nor settermethod
gtk-cursor-theme-name
: Property has no getter nor settermethod
gtk-cursor-theme-size
: Property has no getter nor settermethod
gtk-decoration-layout
: Property has no getter nor settermethod
gtk-dialogs-use-header
: Property has no getter nor settermethod
gtk-dnd-drag-threshold
: Property has no getter nor settermethod
gtk-double-click-distance
: Property has no getter nor settermethod
gtk-double-click-time
: Property has no getter nor settermethod
gtk-enable-accels
: Property has no getter nor settermethod
gtk-enable-animations
: Property has no getter nor settermethod
gtk-enable-event-sounds
: Property has no getter nor settermethod
gtk-enable-input-feedback-sounds
: Property has no getter nor settermethod
gtk-enable-primary-paste
: Property has no getter nor settermethod
gtk-entry-password-hint-timeout
: Property has no getter nor settermethod
gtk-entry-select-on-focus
: Property has no getter nor settermethod
gtk-error-bell
: Property has no getter nor settermethod
gtk-font-name
: Property has no getter nor settermethod
gtk-font-rendering
: Property has no getter nor settermethod
gtk-fontconfig-timestamp
: Property has no getter nor settermethod
gtk-hint-font-metrics
: Property has no getter nor settermethod
gtk-icon-theme-name
: Property has no getter nor settermethod
gtk-im-module
: Property has no getter nor settermethod
gtk-keynav-use-caret
: Property has no getter nor settermethod
gtk-label-select-on-focus
: Property has no getter nor settermethod
gtk-long-press-time
: Property has no getter nor settermethod
gtk-overlay-scrolling
: Property has no getter nor settermethod
gtk-primary-button-warps-slider
: Property has no getter nor settermethod
gtk-print-backends
: Property has no getter nor settermethod
gtk-print-preview-command
: Property has no getter nor settermethod
gtk-recent-files-enabled
: Property has no getter nor settermethod
gtk-recent-files-max-age
: Property has no getter nor settermethod
gtk-shell-shows-app-menu
: Property has no getter nor settermethod
gtk-shell-shows-desktop
: Property has no getter nor settermethod
gtk-shell-shows-menubar
: Property has no getter nor settermethod
gtk-show-status-shapes
: Property has no getter nor settermethod
gtk-sound-theme-name
: Property has no getter nor settermethod
gtk-split-cursor
: Property has no getter nor settermethod
gtk-theme-name
: Property has no getter nor settermethod
gtk-titlebar-double-click
: Property has no getter nor settermethod
gtk-titlebar-middle-click
: Property has no getter nor settermethod
gtk-titlebar-right-click
: Property has no getter nor settermethod
gtk-xft-antialias
: Property has no getter nor settermethod
gtk-xft-dpi
: Property has no getter nor settermethod
gtk-xft-hinting
: Property has no getter nor settermethod
gtk-xft-hintstyle
: Property has no getter nor settermethod
gtk-xft-rgba
: Property has no getter nor setter
Constructors
Properties
Functions
Undoes the effect of calling g_object_set() to install an application-specific value for a setting.