Commit e46a3f89 authored by Daiki Ueno's avatar Daiki Ueno
Browse files

Add theme option in gsettings.

parent 6843cd62
......@@ -46,5 +46,10 @@
<summary>Switch to fullscreen mode when startup</summary>
<description>If true, switch to fullscreen mode when startup.</description>
<key name="theme" type="s">
<description>Base name of the theme to apply.</description>
......@@ -33,8 +33,6 @@
#include "server-context-service.h"
#define DEFAULT_THEME (THEMEDIR "/default.css")
enum {
......@@ -292,7 +290,9 @@ update_widget (ServerContextService *context)
const EekKeyboard *keyboard;
const gchar *client_name;
EekBounds bounds;
gchar *theme_name, *theme_path;
EekTheme *theme;
ClutterActor *stage, *actor;
ClutterColor stage_color = { 0xff, 0xff, 0xff, 0xff };
......@@ -301,7 +301,13 @@ update_widget (ServerContextService *context)
if (context->widget)
gtk_widget_destroy (context->widget);
theme = eek_theme_new (DEFAULT_THEME, NULL, NULL);
theme_name = g_settings_get_string (context->settings, "theme");
theme_path = g_strdup_printf ("%s/%s.css", THEMEDIR, theme_name);
g_free (theme_name);
theme = eek_theme_new (theme_path, NULL, NULL);
g_free (theme_path);
keyboard = eekboard_context_service_get_keyboard (EEKBOARD_CONTEXT_SERVICE(context));
eek_element_get_bounds (EEK_ELEMENT(keyboard), &bounds);
if (context->ui_toolkit == UI_TOOLKIT_CLUTTER) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment