Settings
-
class Settings(**properties: Any)
Superclasses: Object
Implemented Interfaces: 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 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 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
get_for_display
, but in many cases, it is more
convenient to use get_settings
.
Methods
-
class Settings
-
get_default() → Settings | None
Gets the GtkSettings
object for the default display, creating
it if necessary.
See get_for_display
.
-
get_for_display(display: Display) → Settings
Gets the GtkSettings
object for display
, creating it if necessary.
- Parameters:
display – a GdkDisplay
-
reset_property(name: str) → None
Undoes the effect of calling set()
to install an
application-specific value for a setting.
After this call, the setting will again follow the session-wide
value for this setting.
- Parameters:
name – the name of the setting to reset
Properties
-
class Settings
-
props.gtk_alternative_button_order: bool
The type of the None singleton.
-
props.gtk_alternative_sort_arrows: bool
The type of the None singleton.
-
props.gtk_application_prefer_dark_theme: bool
The type of the None singleton.
-
props.gtk_cursor_aspect_ratio: float
The type of the None singleton.
-
props.gtk_cursor_blink: bool
The type of the None singleton.
-
props.gtk_cursor_blink_time: int
The type of the None singleton.
-
props.gtk_cursor_blink_timeout: int
The type of the None singleton.
-
props.gtk_cursor_theme_name: str
The type of the None singleton.
-
props.gtk_cursor_theme_size: int
The type of the None singleton.
-
props.gtk_decoration_layout: str
The type of the None singleton.
The type of the None singleton.
-
props.gtk_dnd_drag_threshold: int
The type of the None singleton.
-
props.gtk_double_click_distance: int
The type of the None singleton.
-
props.gtk_double_click_time: int
The type of the None singleton.
-
props.gtk_enable_accels: bool
The type of the None singleton.
-
props.gtk_enable_animations: bool
The type of the None singleton.
-
props.gtk_enable_event_sounds: bool
The type of the None singleton.
-
props.gtk_enable_input_feedback_sounds: bool
The type of the None singleton.
-
props.gtk_enable_primary_paste: bool
The type of the None singleton.
-
props.gtk_entry_password_hint_timeout: int
The type of the None singleton.
-
props.gtk_entry_select_on_focus: bool
The type of the None singleton.
-
props.gtk_error_bell: bool
The type of the None singleton.
-
props.gtk_font_name: str
The type of the None singleton.
-
props.gtk_font_rendering: FontRendering
The type of the None singleton.
-
props.gtk_fontconfig_timestamp: int
The type of the None singleton.
-
props.gtk_hint_font_metrics: bool
The type of the None singleton.
-
props.gtk_icon_theme_name: str
The type of the None singleton.
-
props.gtk_im_module: str
The type of the None singleton.
-
props.gtk_keynav_use_caret: bool
The type of the None singleton.
-
props.gtk_label_select_on_focus: bool
The type of the None singleton.
-
props.gtk_long_press_time: int
The type of the None singleton.
-
props.gtk_overlay_scrolling: bool
The type of the None singleton.
-
props.gtk_primary_button_warps_slider: bool
The type of the None singleton.
-
props.gtk_print_backends: str
The type of the None singleton.
-
props.gtk_print_preview_command: str
The type of the None singleton.
-
props.gtk_recent_files_enabled: bool
The type of the None singleton.
-
props.gtk_recent_files_max_age: int
The type of the None singleton.
The type of the None singleton.
-
props.gtk_shell_shows_desktop: bool
The type of the None singleton.
The type of the None singleton.
-
props.gtk_show_status_shapes: bool
The type of the None singleton.
-
props.gtk_sound_theme_name: str
The type of the None singleton.
-
props.gtk_split_cursor: bool
The type of the None singleton.
-
props.gtk_theme_name: str
The type of the None singleton.
-
props.gtk_titlebar_double_click: str
The type of the None singleton.
-
props.gtk_titlebar_middle_click: str
The type of the None singleton.
-
props.gtk_titlebar_right_click: str
The type of the None singleton.
-
props.gtk_xft_antialias: int
The type of the None singleton.
-
props.gtk_xft_dpi: int
The type of the None singleton.
-
props.gtk_xft_hinting: int
The type of the None singleton.
-
props.gtk_xft_hintstyle: str
The type of the None singleton.
-
props.gtk_xft_rgba: str
The type of the None singleton.