Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions src/BaseItem.vala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* SPDX-FileCopyrightText: 2025 elementary, Inc. (https://elementary.io)
*/

public class Dock.BaseItem : Gtk.Box {
public class Dock.BaseItem : Gtk.Box {
protected static GLib.Settings dock_settings;

static construct {
Expand Down Expand Up @@ -70,6 +70,8 @@
})
);

reveal.done.connect (set_revealed_finish);

unowned var item_manager = ItemManager.get_default ();
var animation_target = new Adw.CallbackAnimationTarget ((val) => {
item_manager.move (this, val, 0);
Expand Down Expand Up @@ -112,11 +114,11 @@

fade.play ();
reveal.play ();
}

reveal.done.connect (() => {
overflow = VISIBLE;
revealed_done ();
});
private void set_revealed_finish () {
overflow = VISIBLE;
revealed_done ();
}

/**
Expand Down
9 changes: 5 additions & 4 deletions src/ItemManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
public Launcher? added_launcher { get; set; default = null; }

private Adw.TimedAnimation resize_animation;
private List<Launcher> launchers; //Only used to keep track of launcher indices
private List<Launcher> launchers; // Only used to keep track of launcher indices

static construct {
settings = new Settings ("io.elementary.dock");
Expand Down Expand Up @@ -131,15 +131,15 @@
}
}

private void add_launcher_via_dnd (Launcher launcher, int index = -1) {
private void add_launcher_via_dnd (Launcher launcher, int index) {
launcher.removed.connect (remove_item);

launchers.insert (launcher, index);
reposition_items ();
launcher.set_revealed (true);
}

private void add_item (BaseItem item, int index = -1) {
private void add_item (BaseItem item) {
item.removed.connect (remove_item);

if (item is Launcher) {
Expand Down Expand Up @@ -170,7 +170,8 @@
}

private void remove_finish (BaseItem item) {
width_request = get_width (); //Temporarily set the width request to avoid flicker until the animation calls the callback for the first time
// Temporarily set the width request to avoid flicker until the animation calls the callback for the first time
width_request = get_width ();

remove (item);
reposition_items ();
Expand Down