Settings

open class Settings(pointer: <Error class: unknown class><<Error class: unknown class>>) : StyleProvider

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 setter

  • method gtk-alternative-sort-arrows: Property has no getter nor setter

  • method gtk-application-prefer-dark-theme: Property has no getter nor setter

  • method gtk-cursor-aspect-ratio: Property has no getter nor setter

  • method gtk-cursor-blink: Property has no getter nor setter

  • method gtk-cursor-blink-time: Property has no getter nor setter

  • method gtk-cursor-blink-timeout: Property has no getter nor setter

  • method gtk-cursor-theme-name: Property has no getter nor setter

  • method gtk-cursor-theme-size: Property has no getter nor setter

  • method gtk-decoration-layout: Property has no getter nor setter

  • method gtk-dialogs-use-header: Property has no getter nor setter

  • method gtk-dnd-drag-threshold: Property has no getter nor setter

  • method gtk-double-click-distance: Property has no getter nor setter

  • method gtk-double-click-time: Property has no getter nor setter

  • method gtk-enable-accels: Property has no getter nor setter

  • method gtk-enable-animations: Property has no getter nor setter

  • method gtk-enable-event-sounds: Property has no getter nor setter

  • method gtk-enable-input-feedback-sounds: Property has no getter nor setter

  • method gtk-enable-primary-paste: Property has no getter nor setter

  • method gtk-entry-password-hint-timeout: Property has no getter nor setter

  • method gtk-entry-select-on-focus: Property has no getter nor setter

  • method gtk-error-bell: Property has no getter nor setter

  • method gtk-font-name: Property has no getter nor setter

  • method gtk-font-rendering: Property has no getter nor setter

  • method gtk-fontconfig-timestamp: Property has no getter nor setter

  • method gtk-hint-font-metrics: Property has no getter nor setter

  • method gtk-icon-theme-name: Property has no getter nor setter

  • method gtk-im-module: Property has no getter nor setter

  • method gtk-keynav-use-caret: Property has no getter nor setter

  • method gtk-label-select-on-focus: Property has no getter nor setter

  • method gtk-long-press-time: Property has no getter nor setter

  • method gtk-overlay-scrolling: Property has no getter nor setter

  • method gtk-primary-button-warps-slider: Property has no getter nor setter

  • method gtk-print-backends: Property has no getter nor setter

  • method gtk-print-preview-command: Property has no getter nor setter

  • method gtk-recent-files-enabled: Property has no getter nor setter

  • method gtk-recent-files-max-age: Property has no getter nor setter

  • method gtk-shell-shows-app-menu: Property has no getter nor setter

  • method gtk-shell-shows-desktop: Property has no getter nor setter

  • method gtk-shell-shows-menubar: Property has no getter nor setter

  • method gtk-show-status-shapes: Property has no getter nor setter

  • method gtk-sound-theme-name: Property has no getter nor setter

  • method gtk-split-cursor: Property has no getter nor setter

  • method gtk-theme-name: Property has no getter nor setter

  • method gtk-titlebar-double-click: Property has no getter nor setter

  • method gtk-titlebar-middle-click: Property has no getter nor setter

  • method gtk-titlebar-right-click: Property has no getter nor setter

  • method gtk-xft-antialias: Property has no getter nor setter

  • method gtk-xft-dpi: Property has no getter nor setter

  • method gtk-xft-hinting: Property has no getter nor setter

  • method gtk-xft-hintstyle: Property has no getter nor setter

  • method gtk-xft-rgba: Property has no getter nor setter

Constructors

Link copied to clipboard
constructor(pointer: <Error class: unknown class><<Error class: unknown class>>)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val gtkSettingsPointer: <Error class: unknown class><<Error class: unknown class>>
Link copied to clipboard
open override val gtkStyleProviderPointer: <Error class: unknown class><<Error class: unknown class>>

Functions

Link copied to clipboard
open fun connectGtkPrivateChanged(connectFlags: <Error class: unknown class> = ConnectFlags(0u), handler: () -> Unit): <Error class: unknown class>
Link copied to clipboard
open fun resetProperty(name: String)

Undoes the effect of calling g_object_set() to install an application-specific value for a setting.