Skip to content

Commit

Permalink
settings: Add support for a dark-theme property
Browse files Browse the repository at this point in the history
As Brisk Menu runs out of process, we can independently control
our appearance to offer the dark theme variant, separate from the
rest of the panel applets.

Signed-off-by: Ikey Doherty <[email protected]>
  • Loading branch information
ikeydoherty committed Jan 1, 2017
1 parent 2959f67 commit 671b621
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
5 changes: 5 additions & 0 deletions data/com.solus-project.brisk-menu.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
<summary>Pinned Shortcuts</summary>
<description>These shortcuts will appear in the Brisk Menu sidepane.</description>
</key>
<key type="b" name="dark-theme">
<default>false</default>
<summary>Use dark theme variant for Brisk Menu</summary>
<description>Use the dark theme for Brisk Menu aka night mode</description>
</key>
</schema>
</schemalist>
11 changes: 11 additions & 0 deletions src/menu-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,18 @@ BRISK_END_PEDANTIC

void brisk_menu_window_init_settings(BriskMenuWindow *self)
{
GtkSettings *gtk_settings = NULL;

self->settings = g_settings_new("com.solus-project.brisk-menu");

gtk_settings = gtk_settings_get_default();

/* Make dark-theme key work */
g_settings_bind(self->settings,
"dark-theme",
gtk_settings,
"gtk-application-prefer-dark-theme",
G_SETTINGS_BIND_DEFAULT);
}

/*
Expand Down

0 comments on commit 671b621

Please sign in to comment.