From d9e1c01ff716baa239e1aaf8e8ee157d2977e4e3 Mon Sep 17 00:00:00 2001 From: lainsce Date: Wed, 18 Jan 2023 20:06:48 -0300 Subject: [PATCH] fix margin --- lib/Widgets/AppBar.vala | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Widgets/AppBar.vala b/lib/Widgets/AppBar.vala index 29370be7..d37d6030 100644 --- a/lib/Widgets/AppBar.vala +++ b/lib/Widgets/AppBar.vala @@ -205,6 +205,12 @@ public class He.AppBar : He.Bin { main_box.add_css_class ("appbar"); main_box.remove_css_class ("flat-appbar"); } + + if (_flat && !_show_buttons) { + top_box.margin_top = 36; + } else { + top_box.margin_top = 0; + } } } @@ -220,13 +226,7 @@ public class He.AppBar : He.Bin { _show_buttons = value; title.set_visible (value); - - if (!value && _flat) { - top_box.margin_top = 36; - } else { - top_box.margin_top = 0; - } - + top_box.margin_top = 0; } }