StyleManager
Object Hierarchy:
He.StyleManager
He.StyleManager
He.StyleManager
GLib.Object
GLib.Object
GLib.Object->He.StyleManager
Description:
public class StyleManager : Object
A class that manages the style of the application in conjunction with the provided preferences. This is a low-level class that should not
be used directly. Instead, let the `He.Application` class manage this for you.
Content:
Properties:
public bool is_registered { get ; }
Whether the style manager has been registered. Unregistered style
managers will not apply their styles.
public CssProvider user_base { get ; }
The base style provider for application provided styles. In this case
user refers to the application, not the user of the application.
public CssProvider user_dark { get ; }
The dark style provider for application provided styles. This will be
applied in addition to the base style provider when dark mode is enabled.
Creation methods:
Methods:
public void register ()
Register the style manager with GTK. This will also call update.
public string style_refresh (DynamicScheme scheme_factory)
public void unregister ()
Unregister the style manager with GTK.
public void update ()
Runs all the necessary updates to apply the current style. If
is_registered is false, this will do nothing.
public string weight_refresh (double font_weight)
Fields:
public RGBColor ? accent_color
The preferred accent color. If null, a default accent color will be
chosen based on the color scheme.
public double contrast
Whether to apply styles for contrast modes. -1.0 = low, 0.0 = default,
0.5 = medium, 1.0 = high
public double font_weight
The preferred font weight.
public bool is_dark
Whether to apply styles for dark mode.
public double roundness
The preferred UI roundness.
public SchemeVariant ? scheme_variant
A function that returns a color scheme from a given accent color and
whether dark mode is enabled.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref