user-controls: Add CSS to support styling switches as ‘restrictive’
This will be used in upcoming commits to mark switches as restricting something when they’re active, rather than allowing something. Their background will be red, rather than blue. Signed-off-by: Philip Withnall <withnall@endlessm.com> Helps: #11
This commit is contained in:
parent
67ca6806e6
commit
b9a2b7a6a7
3 changed files with 27 additions and 0 deletions
|
@ -949,12 +949,20 @@ mct_user_controls_init (MctUserControls *self)
|
|||
{
|
||||
g_autoptr(GDBusConnection) system_bus = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
g_autoptr(GtkCssProvider) provider = NULL;
|
||||
|
||||
/* Ensure the types used in the UI are registered. */
|
||||
g_type_ensure (MCT_TYPE_RESTRICT_APPLICATIONS_DIALOG);
|
||||
|
||||
gtk_widget_init_template (GTK_WIDGET (self));
|
||||
|
||||
provider = gtk_css_provider_new ();
|
||||
gtk_css_provider_load_from_resource (provider,
|
||||
"/org/freedesktop/MalcontentUi/ui/restricts-switch.css");
|
||||
gtk_style_context_add_provider_for_screen (gdk_screen_get_default (),
|
||||
GTK_STYLE_PROVIDER (provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION - 1);
|
||||
|
||||
self->selected_age = (guint) -1;
|
||||
|
||||
self->cancellable = g_cancellable_new ();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue