Top | ![]() |
![]() |
![]() |
![]() |
void dzl_theme_manager_add_resources (DzlThemeManager *self
,const gchar *resource_path
);
This will automatically register resources found within resource_path
.
If resource_path
starts with "resource://", embedded GResources will be
used to locate the theme files. Otherwise, resource_path
is expected to be
a path on disk that may or may not exist.
If the resource_path
contains a directory named "themes", that directory
will be traversed for files matching the theme name and variant. For
example, if using the Adwaita theme, "themes/Adwaita.css" will be loaded. If
the dark variant is being used, "themes/Adwaita-dark.css" will be loaeded. If
no matching theme file is located, "themes/shared.css" will be loaded.
When the current theme changes, the CSS will be reloaded to adapt.
The "icons" sub-directory will be used to locate icon themes.
void dzl_theme_manager_remove_resources (DzlThemeManager *self
,const gchar *resource_path
);
This removes the CSS providers that were registered using resource_path
.
You must have previously called dzl_theme_manager_add_resources()
for
this function to do anything.
Since icons cannot be unloaded, previously loaded icons will continue to be available even after calling this function.