diff --git a/schemas/io.elementary.desktop.wingpanel.gschema.xml b/schemas/io.elementary.desktop.wingpanel.gschema.xml
index ac80050a..12a3a794 100644
--- a/schemas/io.elementary.desktop.wingpanel.gschema.xml
+++ b/schemas/io.elementary.desktop.wingpanel.gschema.xml
@@ -11,6 +11,11 @@
Sets if scrolling on the panel switches workspaces.
Sets if scrolling on the panel switches workspaces.
+
+ -1
+ The current allocated height of the wingpanel widget.
+ The current allocated height of the wingpanel widget.
+
diff --git a/src/PanelWindow.vala b/src/PanelWindow.vala
index 88c23192..868de064 100644
--- a/src/PanelWindow.vala
+++ b/src/PanelWindow.vala
@@ -87,6 +87,8 @@ public class Wingpanel.PanelWindow : Gtk.Window {
Services.BackgroundManager.initialize (panel.get_height ());
initialized_background_manager = true;
}
+
+ Widgets.Panel.panel_settings.set_int ("height", get_height ());
}
private void on_enter_monitor (Gdk.Monitor new_monitor) {
diff --git a/src/Widgets/Panel.vala b/src/Widgets/Panel.vala
index 6999e9c3..9751276d 100644
--- a/src/Widgets/Panel.vala
+++ b/src/Widgets/Panel.vala
@@ -18,7 +18,7 @@
*/
public class Wingpanel.Widgets.Panel : Granite.Bin {
- private static Settings panel_settings = new Settings ("io.elementary.desktop.wingpanel");
+ public static Settings panel_settings { get; private set; }
public Services.PopoverManager popover_manager { get; construct; }
@@ -37,6 +37,10 @@ public class Wingpanel.Widgets.Panel : Granite.Bin {
set_css_name ("panel");
}
+ static construct {
+ panel_settings = new Settings ("io.elementary.desktop.wingpanel");
+ }
+
construct {
hexpand = true;
vexpand = true;