From 35844b7149923b61a5fc70e04a60fb875213a5e4 Mon Sep 17 00:00:00 2001 From: Adam Dernis Date: Fri, 18 Oct 2024 10:16:24 -0400 Subject: [PATCH] Removed unused drag resizing code --- RetroBar/Taskbar.xaml | 3 --- RetroBar/Taskbar.xaml.cs | 36 ------------------------------------ 2 files changed, 39 deletions(-) diff --git a/RetroBar/Taskbar.xaml b/RetroBar/Taskbar.xaml index cce5adfb..134f8787 100644 --- a/RetroBar/Taskbar.xaml +++ b/RetroBar/Taskbar.xaml @@ -13,9 +13,6 @@ Deactivated="Taskbar_Deactivated" AllowDrop="True" Style="{DynamicResource TaskbarWindow}"> - - - diff --git a/RetroBar/Taskbar.xaml.cs b/RetroBar/Taskbar.xaml.cs index deaee617..b54f4b7a 100644 --- a/RetroBar/Taskbar.xaml.cs +++ b/RetroBar/Taskbar.xaml.cs @@ -72,7 +72,6 @@ public Taskbar(WindowManager windowManager, ShellManager shellManager, StartMenu DesiredRowHeight = Settings.Instance.TaskbarScale * (Application.Current.FindResource("TaskbarHeight") as double? ?? 0); DesiredWidth = Settings.Instance.TaskbarScale * (Application.Current.FindResource("TaskbarWidth") as double? ?? 0); DesiredHeight = DesiredRowHeight * Rows; - MinHeight = DesiredRowHeight; if (AppBarMode == AppBarMode.AutoHide || !Settings.Instance.LockTaskbar) { @@ -84,8 +83,6 @@ public Taskbar(WindowManager windowManager, ShellManager shellManager, StartMenu FlowDirection = Application.Current.FindResource("flow_direction") as FlowDirection? ?? FlowDirection.LeftToRight; - UpdateResizingOptions(); - Settings.Instance.PropertyChanged += Settings_PropertyChanged; if (Settings.Instance.ShowQuickLaunch) @@ -229,7 +226,6 @@ private void Settings_PropertyChanged(object sender, PropertyChangedEventArgs e) PeekDuringAutoHide(); AppBarEdge = Settings.Instance.Edge; SetScreenPosition(); - UpdateResizingOptions(); } else if (e.PropertyName == nameof(Settings.Language)) { @@ -278,7 +274,6 @@ private void Settings_PropertyChanged(object sender, PropertyChangedEventArgs e) { OnPropertyChanged(nameof(IsLocked)); PeekDuringAutoHide(); - UpdateResizingOptions(); RecalculateSize(); } else if (e.PropertyName == nameof(Settings.RowCount)) @@ -288,37 +283,6 @@ private void Settings_PropertyChanged(object sender, PropertyChangedEventArgs e) } } - private void UpdateResizingOptions() - { - /* - - Someday this is less janky it could be used. In the meantime, set the row count from the properties menu. - - // This is sort of a cop-out to prevent a cycle where the primary and secondary monitors will continously loop - // between different row counts. As a result, only the primary taskbar can be used for resizing. - if (!Screen.Primary) - return; - - const int resizeThickness = 5; - - if (IsLocked) - { - ResizeMode = ResizeMode.NoResize; - Chrome.ResizeBorderThickness = new Thickness(0); - } - else - { - ResizeMode = ResizeMode.CanResize; - Chrome.ResizeBorderThickness = AppBarEdge switch - { - AppBarEdge.Left => new Thickness(0, 0, resizeThickness ,0), - AppBarEdge.Right => new Thickness(resizeThickness, 0, 0 ,0), - AppBarEdge.Top => new Thickness(0, 0, 0 ,resizeThickness), - AppBarEdge.Bottom or _ => new Thickness(0, resizeThickness, 0 ,0), - }; - }*/ - } - private void Taskbar_OnLocationChanged(object sender, EventArgs e) { UpdateTrayPosition();