diff --git a/BeatSaberModManager/Resources/Styles/HamburgerMenu.axaml b/BeatSaberModManager/Resources/Styles/HamburgerMenu.axaml
index 6f09f04..e3eabbd 100644
--- a/BeatSaberModManager/Resources/Styles/HamburgerMenu.axaml
+++ b/BeatSaberModManager/Resources/Styles/HamburgerMenu.axaml
@@ -149,11 +149,13 @@
-
+
+
diff --git a/BeatSaberModManager/Views/Controls/HamburgerMenu.cs b/BeatSaberModManager/Views/Controls/HamburgerMenu.cs
index 88bd7b8..a3a40ce 100644
--- a/BeatSaberModManager/Views/Controls/HamburgerMenu.cs
+++ b/BeatSaberModManager/Views/Controls/HamburgerMenu.cs
@@ -30,6 +30,11 @@ public class HamburgerMenu : TabControl
///
public static readonly StyledProperty ExpandedModeThresholdWidthProperty = AvaloniaProperty.Register(nameof(ExpandedModeThresholdWidth), 1008);
+ ///
+ /// Defines the property.
+ ///
+ public static readonly StyledProperty ContentMarginProperty = AvaloniaProperty.Register(nameof(ContentMargin));
+
///
/// Gets or sets the brush used to draw the pane's background.
///
@@ -57,6 +62,15 @@ public int ExpandedModeThresholdWidth
set => SetValue(ExpandedModeThresholdWidthProperty, value);
}
+ ///
+ /// Gets or sets margin of the content.
+ ///
+ public Thickness ContentMargin
+ {
+ get => GetValue(ContentMarginProperty);
+ set => SetValue(ContentMarginProperty, value);
+ }
+
///
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
{
diff --git a/BeatSaberModManager/Views/Windows/MainWindow.axaml b/BeatSaberModManager/Views/Windows/MainWindow.axaml
index 49d7438..1149f11 100644
--- a/BeatSaberModManager/Views/Windows/MainWindow.axaml
+++ b/BeatSaberModManager/Views/Windows/MainWindow.axaml
@@ -11,6 +11,7 @@
x:Class="BeatSaberModManager.Views.Windows.MainWindow"
x:DataType="vm:MainWindowViewModel"
Name="Window"
+ Margin="{Binding #Window.OffScreenMargin}"
TransparencyLevelHint="Mica, Blur, None"
Title="{StaticResource MainWindow:Title}"
Icon="/Resources/Icons/Icon.ico"
@@ -22,7 +23,7 @@
-
+
diff --git a/BeatSaberModManager/Views/Windows/MainWindow.axaml.cs b/BeatSaberModManager/Views/Windows/MainWindow.axaml.cs
index 15409b4..3e83cd4 100644
--- a/BeatSaberModManager/Views/Windows/MainWindow.axaml.cs
+++ b/BeatSaberModManager/Views/Windows/MainWindow.axaml.cs
@@ -1,10 +1,18 @@
using System;
+using System.Linq;
+using System.Reactive.Linq;
using Avalonia;
+using Avalonia.Controls;
+using Avalonia.Controls.Chrome;
+using Avalonia.Controls.Primitives;
using Avalonia.ReactiveUI;
+using Avalonia.VisualTree;
using BeatSaberModManager.ViewModels;
+using ReactiveUI;
+
namespace BeatSaberModManager.Views.Windows
{
@@ -27,7 +35,6 @@ public MainWindow(MainWindowViewModel viewModel)
InitializeComponent();
ViewModel = viewModel;
ExtendClientAreaToDecorationsHint = !OperatingSystem.IsLinux();
- Margin = ExtendClientAreaToDecorationsHint ? WindowDecorationMargin : new Thickness();
viewModel.PickInstallDirInteraction.RegisterHandler(async context => context.SetOutput(await new InstallFolderDialogWindow().ShowDialog(this).ConfigureAwait(false)));
}
}