Skip to content

Commit 055bfea

Browse files
lenemterdanirabbit
andauthored
Increase actionable area of an app icon all way to the screen edge (#460)
Co-authored-by: Danielle Foré <[email protected]>
1 parent c710e6f commit 055bfea

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

src/BaseItem.vala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public class Dock.BaseItem : Gtk.Box {
107107

108108
append (bin);
109109
append (running_revealer);
110+
append (new BottomMargin ());
110111

111112
icon_size = dock_settings.get_int ("icon-size");
112113
dock_settings.changed["icon-size"].connect (() => {

src/MainWindow.vala

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
88
class construct {
99
set_css_name ("dock");
1010
}
11+
12+
construct {
13+
vexpand = true;
14+
}
1115
}
1216

1317
// Matches top margin in Launcher.css
@@ -20,8 +24,6 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
2024
private Pantheon.Desktop.Shell? desktop_shell;
2125
private Pantheon.Desktop.Panel? panel;
2226

23-
private Gtk.Box main_box;
24-
2527
private WindowDragManager window_drag_manager;
2628
private bool initialized_blur = false;
2729

@@ -30,26 +32,27 @@ public class Dock.MainWindow : Gtk.ApplicationWindow {
3032
}
3133

3234
construct {
33-
var launcher_manager = ItemManager.get_default ();
34-
3535
overflow = VISIBLE;
3636
resizable = false;
3737
titlebar = new Gtk.Label ("") { visible = false };
3838

39+
var dock_box = new Gtk.Box (VERTICAL, 0);
40+
dock_box.append (new Container ());
41+
dock_box.append (new BottomMargin ());
42+
43+
unowned var launcher_manager = ItemManager.get_default ();
44+
3945
// Don't clip launchers to dock background https://github.com/elementary/dock/issues/275
4046
var overlay = new Gtk.Overlay () {
41-
child = new Container ()
47+
child = dock_box
4248
};
4349
overlay.add_overlay (launcher_manager);
4450

4551
var size_group = new Gtk.SizeGroup (Gtk.SizeGroupMode.BOTH);
46-
size_group.add_widget (overlay.child);
52+
size_group.add_widget (dock_box);
4753
size_group.add_widget (launcher_manager);
4854

49-
main_box = new Gtk.Box (VERTICAL, 0);
50-
main_box.append (overlay);
51-
main_box.append (new BottomMargin ());
52-
child = main_box;
55+
child = overlay;
5356

5457
remove_css_class ("background");
5558

0 commit comments

Comments
 (0)