diff --git a/NickvisionMoney.GNOME/Blueprints/window.blp b/NickvisionMoney.GNOME/Blueprints/window.blp index 0734f75eb..c1cf54465 100644 --- a/NickvisionMoney.GNOME/Blueprints/window.blp +++ b/NickvisionMoney.GNOME/Blueprints/window.blp @@ -17,11 +17,9 @@ Adw.ApplicationWindow _root { default-height: 720; width-request: 360; - Adw.ToolbarView { - top-bar-style: raised; - + Adw.ToolbarView _toolbarView { [top] - Adw.HeaderBar _headerBar { + Adw.HeaderBar { title-widget: Adw.WindowTitle _windowTitle {}; [start] diff --git a/NickvisionMoney.GNOME/Views/MainWindow.cs b/NickvisionMoney.GNOME/Views/MainWindow.cs index 3a1af258a..c883ec11d 100644 --- a/NickvisionMoney.GNOME/Views/MainWindow.cs +++ b/NickvisionMoney.GNOME/Views/MainWindow.cs @@ -33,7 +33,7 @@ public partial class MainWindow : Adw.ApplicationWindow private readonly MainWindowController _controller; private readonly Adw.Application _application; - [Gtk.Connect] private readonly Adw.HeaderBar _headerBar; + [Gtk.Connect] private readonly Adw.ToolbarView _toolbarView; [Gtk.Connect] private readonly Adw.WindowTitle _windowTitle; [Gtk.Connect] private readonly Gtk.MenuButton _accountMenuButton; [Gtk.Connect] private readonly Gtk.Popover _accountPopover; @@ -285,7 +285,7 @@ private bool OnCloseRequested(Gtk.Window sender, EventArgs e) private async void AccountAdded(object? sender, EventArgs e) { _viewStack.SetVisibleChildName("pageTabs"); - _headerBar.RemoveCssClass("flat"); + _toolbarView.SetTopBarStyle(Adw.ToolbarStyle.Raised); var newAccountView = new AccountView(_controller.GetMostRecentAccountViewController(), this, _tabView, _flapToggleButton, _graphToggleButton, UpdateSubtitle); _tabView.SetSelectedPage(newAccountView.Page); _accountViews.Add(newAccountView.Page); @@ -370,7 +370,7 @@ private bool OnCloseAccountPage(Adw.TabView view, Adw.TabView.ClosePageSignalArg if (_controller.NumberOfOpenAccounts == 0) { _viewStack.SetVisibleChildName("pageNoAccounts"); - _headerBar.AddCssClass("flat"); + _toolbarView.SetTopBarStyle(Adw.ToolbarStyle.Flat); _accountMenuButton.SetVisible(false); _flapToggleButton.SetVisible(false); _graphToggleButton.SetVisible(false);