diff --git a/Mailnag/configuration/configwindow.py b/Mailnag/configuration/configwindow.py index c020b72..7ad5811 100644 --- a/Mailnag/configuration/configwindow.py +++ b/Mailnag/configuration/configwindow.py @@ -24,7 +24,7 @@ import os import xdg.BaseDirectory as bd -from gi.repository import GLib, GdkPixbuf, Gtk, GObject +from gi.repository import GLib, GdkPixbuf, Gdk, Gtk, GObject from common.dist_cfg import PACKAGE_NAME, APP_VERSION from common.i18n import _ @@ -57,6 +57,7 @@ class ConfigWindow: self._window = builder.get_object("config_window") self._window.set_icon(GdkPixbuf.Pixbuf.new_from_file_at_size(get_data_file("mailnag.svg"), 48, 48)); + self._load_stylesheet('config_window.css') self._cfg = read_cfg() self.daemon_enabled = False @@ -135,6 +136,14 @@ class ConfigWindow: self._window.show() + def _load_stylesheet(self, stylesheet): + provider = Gtk.CssProvider() + provider.load_from_path(get_data_file(stylesheet)) + Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(), + provider, + Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION) + + def _load_config(self): self._switch_daemon_enabled.set_active(bool(int(self._cfg.get('core', 'autostart')))) diff --git a/data/config_window.css b/data/config_window.css new file mode 100644 index 0000000..8fc7a6e --- /dev/null +++ b/data/config_window.css @@ -0,0 +1,6 @@ +GtkEventBox { + background-image: linear-gradient(to bottom, + @theme_bg_color, + shade(@theme_bg_color, 1.06) + 90%); +} diff --git a/data/config_window.ui b/data/config_window.ui index 64088c2..d45eba5 100644 --- a/data/config_window.ui +++ b/data/config_window.ui @@ -1,31 +1,9 @@ - - - - - - - - - - - - - - - - - - - - - - 400 - 360 + 380 False Mailnag Configuration False @@ -41,8 +19,8 @@ False 18 18 - 6 - 6 + 12 + 12 True