@@ -10,12 +10,6 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
1010 }
1111 }
1212
13- private class BottomMargin : Gtk .Widget {
14- class construct {
15- set_css_name ("bottom -margin ");
16- }
17- }
18-
1913 // Matches top margin in Launcher.css
2014 private const int TOP_MARGIN = 64 ;
2115 private const int BORDER_RADIUS = 9 ;
@@ -29,7 +23,6 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
2923 private Gtk . Box main_box;
3024
3125 private WindowDragManager window_drag_manager;
32- private BottomMargin bottom_margin;
3326 private bool initialized_blur = false ;
3427
3528 class construct {
@@ -53,11 +46,9 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
5346 size_group. add_widget (overlay. child);
5447 size_group. add_widget (launcher_manager);
5548
56- bottom_margin = new BottomMargin ();
57-
5849 main_box = new Gtk .Box (VERTICAL , 0 );
5950 main_box. append (overlay);
60- main_box. append (bottom_margin );
51+ main_box. append (new BottomMargin () );
6152 child = main_box;
6253
6354 remove_css_class (" background" );
@@ -141,13 +132,10 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
141132 return ;
142133 }
143134
144- Graphene . Rect bounds;
145- bottom_margin. compute_bounds (bottom_margin, out bounds);
146-
147135 initialized_blur = true ;
148136
149137 if (panel != null ) {
150- panel. add_blur (0 , 0 , 0 , ( int ) bounds . get_height (), BORDER_RADIUS );
138+ panel. add_blur (0 , 0 , 0 , BottomMargin . get_size (), BORDER_RADIUS );
151139 } else {
152140 update_panel_x11 ();
153141 }
@@ -183,9 +171,7 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
183171 var value = " anchor=8:hide-mode=%d :restore-previous-region=1:visible-in-multitasking-view=1" . printf (settings. get_enum (" autohide-mode" ));
184172
185173 if (initialized_blur) {
186- Graphene . Rect bounds;
187- bottom_margin. compute_bounds (bottom_margin, out bounds);
188- value + = " :blur=0,0,0,%d ,%d " . printf ((int ) bounds. get_height (), BORDER_RADIUS );
174+ value + = " :blur=0,0,0,%d ,%d " . printf (BottomMargin . get_size (), BORDER_RADIUS );
189175 }
190176
191177 xdisplay. change_property (window, prop, X . XA_STRING , 8 , 0 , (uchar[]) value , value . length);
0 commit comments