From 40ad7c65eccf6a82af38547695e8de243bcedc14 Mon Sep 17 00:00:00 2001 From: Vishal Rao Date: Mon, 7 Sep 2026 19:51:24 +0530 Subject: [PATCH] Store dock height in settings schema --- data/dock.gschema.xml | 6 ++++++ src/MainWindow.vala | 3 +++ 2 files changed, 9 insertions(+) diff --git a/data/dock.gschema.xml b/data/dock.gschema.xml index d81d4b86..05066813 100644 --- a/data/dock.gschema.xml +++ b/data/dock.gschema.xml @@ -21,6 +21,12 @@ Logical pixel size of app launcher icons + + -1 + Current allocated height + Current allocated height + + ['io.elementary.files.desktop', 'org.gnome.Epiphany.desktop', 'io.elementary.mail.desktop', 'io.elementary.tasks.desktop', 'io.elementary.calendar.desktop', 'io.elementary.music.desktop', 'io.elementary.videos.desktop', 'io.elementary.photos.desktop', 'io.elementary.appcenter.desktop', 'io.elementary.installer.desktop'] An ordered array of app id's to show as launchers diff --git a/src/MainWindow.vala b/src/MainWindow.vala index f54a6dcc..fdf690cd 100644 --- a/src/MainWindow.vala +++ b/src/MainWindow.vala @@ -108,6 +108,8 @@ public class Dock.MainWindow : Gtk.ApplicationWindow { private void init_panel () { unowned var surface = (Gdk.Toplevel) get_surface (); + settings.set_int ("height", surface.height); + surface.compute_size.connect ((surface, size) => { // manually set shadow width since the additional margin we add to avoid icons clipping when // bouncing isn't added by default and instead counts to the frame @@ -118,6 +120,7 @@ public class Dock.MainWindow : Gtk.ApplicationWindow { }); surface.layout.connect ((surface, width, height) => { + settings.set_int ("height", height); // manually set input region since container's shadow are is the content of the window // and it still gets window events var item_manager_width = item_manager.get_width ();