class Gtk::Settings
- Gtk::Settings
- GObject::Object
- Reference
- Object
Overview
Gtk::Settings
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 DConf.
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 Gtk::Settings
object with g_object_set(). This should be restricted
to special cases though; Gtk::Settings
are not meant as an application
configuration facility.
There is one Gtk::Settings
instance per display. It can be obtained with
Gtk::Settings#for_display
, but in many cases, it is more
convenient to use Gtk::Widget#settings
.
Included Modules
Defined in:
lib/gi-crystal/src/auto/gtk-4.0/settings.crConstructors
-
.new
Initialize a new
Settings
. - .new(*, gtk_alternative_button_order : Bool? = nil, gtk_alternative_sort_arrows : Bool? = nil, gtk_application_prefer_dark_theme : Bool? = nil, gtk_cursor_aspect_ratio : Float64? = nil, gtk_cursor_blink : Bool? = nil, gtk_cursor_blink_time : Int32? = nil, gtk_cursor_blink_timeout : Int32? = nil, gtk_cursor_theme_name : String? = nil, gtk_cursor_theme_size : Int32? = nil, gtk_decoration_layout : String? = nil, gtk_dialogs_use_header : Bool? = nil, gtk_dnd_drag_threshold : Int32? = nil, gtk_double_click_distance : Int32? = nil, gtk_double_click_time : Int32? = nil, gtk_enable_accels : Bool? = nil, gtk_enable_animations : Bool? = nil, gtk_enable_event_sounds : Bool? = nil, gtk_enable_input_feedback_sounds : Bool? = nil, gtk_enable_primary_paste : Bool? = nil, gtk_entry_password_hint_timeout : UInt32? = nil, gtk_entry_select_on_focus : Bool? = nil, gtk_error_bell : Bool? = nil, gtk_font_name : String? = nil, gtk_fontconfig_timestamp : UInt32? = nil, gtk_hint_font_metrics : Bool? = nil, gtk_icon_theme_name : String? = nil, gtk_im_module : String? = nil, gtk_keynav_use_caret : Bool? = nil, gtk_label_select_on_focus : Bool? = nil, gtk_long_press_time : UInt32? = nil, gtk_overlay_scrolling : Bool? = nil, gtk_primary_button_warps_slider : Bool? = nil, gtk_print_backends : String? = nil, gtk_print_preview_command : String? = nil, gtk_recent_files_enabled : Bool? = nil, gtk_recent_files_max_age : Int32? = nil, gtk_shell_shows_app_menu : Bool? = nil, gtk_shell_shows_desktop : Bool? = nil, gtk_shell_shows_menubar : Bool? = nil, gtk_sound_theme_name : String? = nil, gtk_split_cursor : Bool? = nil, gtk_theme_name : String? = nil, gtk_titlebar_double_click : String? = nil, gtk_titlebar_middle_click : String? = nil, gtk_titlebar_right_click : String? = nil, gtk_xft_antialias : Int32? = nil, gtk_xft_dpi : Int32? = nil, gtk_xft_hinting : Int32? = nil, gtk_xft_hintstyle : String? = nil, gtk_xft_rgba : String? = nil)
Class Method Summary
-
.default : Gtk::Settings?
Gets the
Gtk::Settings
object for the default display, creating it if necessary. -
.for_display(display : Gdk::Display) : Gtk::Settings
Gets the
Gtk::Settings
object for @display, creating it if necessary. -
.g_type : UInt64
Returns the type id (GType) registered in GLib type system.
Instance Method Summary
- #gtk_alternative_button_order=(value : Bool) : Bool
- #gtk_alternative_button_order? : Bool
- #gtk_alternative_sort_arrows=(value : Bool) : Bool
- #gtk_alternative_sort_arrows? : Bool
- #gtk_application_prefer_dark_theme=(value : Bool) : Bool
- #gtk_application_prefer_dark_theme? : Bool
- #gtk_cursor_aspect_ratio : Float64
- #gtk_cursor_aspect_ratio=(value : Float64) : Float64
- #gtk_cursor_blink=(value : Bool) : Bool
- #gtk_cursor_blink? : Bool
- #gtk_cursor_blink_time : Int32
- #gtk_cursor_blink_time=(value : Int32) : Int32
- #gtk_cursor_blink_timeout : Int32
- #gtk_cursor_blink_timeout=(value : Int32) : Int32
- #gtk_cursor_theme_name : String
- #gtk_cursor_theme_name=(value : String) : String
- #gtk_cursor_theme_size : Int32
- #gtk_cursor_theme_size=(value : Int32) : Int32
- #gtk_decoration_layout : String
- #gtk_decoration_layout=(value : String) : String
- #gtk_dialogs_use_header=(value : Bool) : Bool
- #gtk_dialogs_use_header? : Bool
- #gtk_dnd_drag_threshold : Int32
- #gtk_dnd_drag_threshold=(value : Int32) : Int32
- #gtk_double_click_distance : Int32
- #gtk_double_click_distance=(value : Int32) : Int32
- #gtk_double_click_time : Int32
- #gtk_double_click_time=(value : Int32) : Int32
- #gtk_enable_accels=(value : Bool) : Bool
- #gtk_enable_accels? : Bool
- #gtk_enable_animations=(value : Bool) : Bool
- #gtk_enable_animations? : Bool
- #gtk_enable_event_sounds=(value : Bool) : Bool
- #gtk_enable_event_sounds? : Bool
- #gtk_enable_input_feedback_sounds=(value : Bool) : Bool
- #gtk_enable_input_feedback_sounds? : Bool
- #gtk_enable_primary_paste=(value : Bool) : Bool
- #gtk_enable_primary_paste? : Bool
- #gtk_entry_password_hint_timeout : UInt32
- #gtk_entry_password_hint_timeout=(value : UInt32) : UInt32
- #gtk_entry_select_on_focus=(value : Bool) : Bool
- #gtk_entry_select_on_focus? : Bool
- #gtk_error_bell=(value : Bool) : Bool
- #gtk_error_bell? : Bool
- #gtk_font_name : String
- #gtk_font_name=(value : String) : String
- #gtk_fontconfig_timestamp : UInt32
- #gtk_fontconfig_timestamp=(value : UInt32) : UInt32
- #gtk_hint_font_metrics=(value : Bool) : Bool
- #gtk_hint_font_metrics? : Bool
- #gtk_icon_theme_name : String
- #gtk_icon_theme_name=(value : String) : String
- #gtk_im_module : String
- #gtk_im_module=(value : String) : String
- #gtk_keynav_use_caret=(value : Bool) : Bool
- #gtk_keynav_use_caret? : Bool
- #gtk_label_select_on_focus=(value : Bool) : Bool
- #gtk_label_select_on_focus? : Bool
- #gtk_long_press_time : UInt32
- #gtk_long_press_time=(value : UInt32) : UInt32
- #gtk_overlay_scrolling=(value : Bool) : Bool
- #gtk_overlay_scrolling? : Bool
- #gtk_primary_button_warps_slider=(value : Bool) : Bool
- #gtk_primary_button_warps_slider? : Bool
- #gtk_print_backends : String
- #gtk_print_backends=(value : String) : String
- #gtk_print_preview_command : String
- #gtk_print_preview_command=(value : String) : String
- #gtk_recent_files_enabled=(value : Bool) : Bool
- #gtk_recent_files_enabled? : Bool
- #gtk_recent_files_max_age : Int32
- #gtk_recent_files_max_age=(value : Int32) : Int32
- #gtk_shell_shows_app_menu=(value : Bool) : Bool
- #gtk_shell_shows_app_menu? : Bool
- #gtk_shell_shows_desktop=(value : Bool) : Bool
- #gtk_shell_shows_desktop? : Bool
- #gtk_shell_shows_menubar=(value : Bool) : Bool
- #gtk_shell_shows_menubar? : Bool
- #gtk_sound_theme_name : String
- #gtk_sound_theme_name=(value : String) : String
- #gtk_split_cursor=(value : Bool) : Bool
- #gtk_split_cursor? : Bool
- #gtk_theme_name : String
- #gtk_theme_name=(value : String) : String
- #gtk_titlebar_double_click : String
- #gtk_titlebar_double_click=(value : String) : String
- #gtk_titlebar_middle_click : String
- #gtk_titlebar_middle_click=(value : String) : String
- #gtk_titlebar_right_click : String
- #gtk_titlebar_right_click=(value : String) : String
- #gtk_xft_antialias : Int32
- #gtk_xft_antialias=(value : Int32) : Int32
- #gtk_xft_dpi : Int32
- #gtk_xft_dpi=(value : Int32) : Int32
- #gtk_xft_hinting : Int32
- #gtk_xft_hinting=(value : Int32) : Int32
- #gtk_xft_hintstyle : String
- #gtk_xft_hintstyle=(value : String) : String
- #gtk_xft_rgba : String
- #gtk_xft_rgba=(value : String) : String
-
#reset_property(name : String) : Nil
Undoes the effect of calling g_object_set() to install an application-specific value for a setting.
Instance methods inherited from module Gtk::StyleProvider
gtk_private_changed_signal
gtk_private_changed_signal,
to_unsafe
to_unsafe
Class methods inherited from module Gtk::StyleProvider
g_type : UInt64
g_type
Instance methods inherited from class GObject::Object
bind_property(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags) : GObject::Binding
bind_property,
bind_property_full(source_property : String, target : GObject::Object, target_property : String, flags : GObject::BindingFlags, transform_to : GObject::Closure, transform_from : GObject::Closure) : GObject::Binding
bind_property_full,
data(key : String) : Pointer(Void)?
data,
finalize
finalize,
freeze_notify : Nil
freeze_notify,
getv(names : Enumerable(String), values : Enumerable(_)) : Nil
getv,
notify(property_name : String) : Nil
notify,
notify_by_pspec(pspec : GObject::ParamSpec) : Nil
notify_by_pspec,
notify_signal
notify_signal,
property(property_name : String, value : _) : Nil
property,
qdata(quark : UInt32) : Pointer(Void)?
qdata,
ref_count : UInt32
ref_count,
run_dispose : Nil
run_dispose,
set_data(key : String, data : Pointer(Void)?) : Nil
set_data,
set_property(property_name : String, value : _) : Nil
set_property,
steal_data(key : String) : Pointer(Void)?
steal_data,
steal_qdata(quark : UInt32) : Pointer(Void)?
steal_qdata,
thaw_notify : Nil
thaw_notify,
to_unsafe : Pointer(Void)
to_unsafe,
watch_closure(closure : GObject::Closure) : Nil
watch_closure
Constructor methods inherited from class GObject::Object
cast(obj : GObject::Object) : self
cast,
cast?(obj : GObject::Object) : self?
cast?,
new(pointer : Pointer(Void), transfer : GICrystal::Transfer)new new, newv(object_type : UInt64, parameters : Enumerable(GObject::Parameter)) : self newv
Class methods inherited from class GObject::Object
compat_control(what : UInt64, data : Pointer(Void)?) : UInt64
compat_control,
g_type : UInt64
g_type,
interface_find_property(g_iface : GObject::TypeInterface, property_name : String) : GObject::ParamSpec
interface_find_property,
interface_list_properties(g_iface : GObject::TypeInterface) : Enumerable(GObject::ParamSpec)
interface_list_properties
Constructor Detail
Class Method Detail
Gets the Gtk::Settings
object for the default display, creating
it if necessary.