Skip to content

Commit

Permalink
Removed unused drag resizing code
Browse files Browse the repository at this point in the history
  • Loading branch information
Avid29 committed Oct 18, 2024
1 parent cfc0236 commit 35844b7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
3 changes: 0 additions & 3 deletions RetroBar/Taskbar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
Deactivated="Taskbar_Deactivated"
AllowDrop="True"
Style="{DynamicResource TaskbarWindow}">
<WindowChrome.WindowChrome>
<WindowChrome x:Name="Chrome" CaptionHeight="0" CornerRadius="0"/>
</WindowChrome.WindowChrome>
<Window.Resources>
<ResourceDictionary>
<converters:BoolToTextRenderingModeConverter x:Key="textRenderingModeConverter" />
Expand Down
36 changes: 0 additions & 36 deletions RetroBar/Taskbar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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)
Expand Down Expand Up @@ -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))
{
Expand Down Expand Up @@ -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))
Expand All @@ -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();
Expand Down

0 comments on commit 35844b7

Please sign in to comment.