Skip to content

Commit

Permalink
Update AppBar margins to use view_title_box instead of labels_box
Browse files Browse the repository at this point in the history
- Set `view_title_box.margin_start` to 12 for consistent spacing.
- Adjust `view_title_box.margin_top` instead of `labels_box.margin_top` for title alignment.
  • Loading branch information
lainsce committed Sep 3, 2024
1 parent 917d8fb commit 89d110e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/Widgets/AppBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public class He.AppBar : He.Bin {
view_title_box.append (value);

view_title_box.set_visible (true);
view_title_box.margin_start = 12;
labels_box.set_visible (true);
sub_box.set_visible (true);
} else {
Expand Down Expand Up @@ -473,15 +474,15 @@ public class He.AppBar : He.Bin {

// Make title align with other titles if no buttons are added.
if (btn_box.visible) {
labels_box.margin_top = 0;
view_title_box.margin_top = 0;
} else {
labels_box.margin_top = 12;
view_title_box.margin_top = 12;
}
btn_box.notify["visible"].connect (() => {
if (btn_box.visible) {
labels_box.margin_top = 0;
view_title_box.margin_top = 0;
} else {
labels_box.margin_top = 12;
view_title_box.margin_top = 12;
}
});
}
Expand Down

0 comments on commit 89d110e

Please sign in to comment.