File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,8 @@ public class Wingpanel.PanelWindow : Gtk.Window {
8080 key_controller. key_pressed. connect (on_key_pressed);
8181
8282 panel. size_allocate. connect (update_panel_dimensions);
83+
84+ notify[" scale-factor" ]. connect (on_scale_changed);
8385 }
8486
8587 private void on_realize () {
@@ -158,6 +160,16 @@ public class Wingpanel.PanelWindow : Gtk.Window {
158160 }
159161 }
160162
163+ private void on_scale_changed () {
164+ if (desktop_panel != null ) {
165+ desktop_panel. set_size (- 1 , get_actual_height ());
166+ } else {
167+ init_x ();
168+ }
169+
170+ update_panel_dimensions ();
171+ }
172+
161173 private int get_actual_height () {
162174 if (! Services . DisplayConfig . is_logical_layout ()) {
163175 return get_allocated_height () * get_scale_factor ();
You can’t perform that action at this time.
0 commit comments