diff --git a/src/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256 b/src/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256
index 11864831640e..e99ab74c6188 100644
--- a/src/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256
+++ b/src/Files.App/Assets/FilesOpenDialog/Files.App.Launcher.exe.sha256
@@ -1 +1 @@
-cb1ca000ef2f03f1afc7bde9ed4fb2987669c89a58b63919e67574696091f60f
+d0b49589cd4b66b73d4b547464c29f6ebaed438ff696562713396f96e0db9edc
diff --git a/src/Files.App/Data/Contracts/IAppSettingsService.cs b/src/Files.App/Data/Contracts/IAppSettingsService.cs
index d40c9b635178..33f97b38861d 100644
--- a/src/Files.App/Data/Contracts/IAppSettingsService.cs
+++ b/src/Files.App/Data/Contracts/IAppSettingsService.cs
@@ -15,10 +15,20 @@ public interface IAppSettingsService : IBaseSettingsService, INotifyPropertyChan
///
bool ShowBackgroundRunningNotification { get; set; }
- ///
- /// Gets or sets a value indicating whether or not to restore tabs on startup.
- /// This is used when prompting users to restart after changing the app language.
- ///
- bool RestoreTabsOnStartup { get; set; }
+ ///
+ /// Gets or sets a value indicating whether or not to restore tabs on startup.
+ /// This is used when prompting users to restart after changing the app language.
+ ///
+ bool RestoreTabsOnStartup { get; set; }
+
+ ///
+ /// Gets or sets the width of the Status Center flyout.
+ ///
+ double StatusCenterWidth { get; set; }
+
+ ///
+ /// Gets or sets the height of the Status Center flyout.
+ ///
+ double StatusCenterHeight { get; set; }
}
}
diff --git a/src/Files.App/Services/Settings/AppSettingsService.cs b/src/Files.App/Services/Settings/AppSettingsService.cs
index 552620e2d0bc..5472817df78f 100644
--- a/src/Files.App/Services/Settings/AppSettingsService.cs
+++ b/src/Files.App/Services/Settings/AppSettingsService.cs
@@ -23,11 +23,23 @@ public bool ShowBackgroundRunningNotification
set => Set(value);
}
- public bool RestoreTabsOnStartup
- {
- get => Get(false);
- set => Set(value);
- }
+ public bool RestoreTabsOnStartup
+ {
+ get => Get(false);
+ set => Set(value);
+ }
+
+ public double StatusCenterWidth
+ {
+ get => Math.Max(300d, Math.Min(600d, Get(400d)));
+ set => Set(Math.Max(300d, Math.Min(600d, value)));
+ }
+
+ public double StatusCenterHeight
+ {
+ get => Math.Max(200d, Math.Min(800d, Get(500d)));
+ set => Set(Math.Max(200d, Math.Min(800d, value)));
+ }
protected override void RaiseOnSettingChangedEvent(object sender, SettingChangedEventArgs e)
{
diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml b/src/Files.App/UserControls/NavigationToolbar.xaml
index 1cbb9df0ebf5..ec9596886be2 100644
--- a/src/Files.App/UserControls/NavigationToolbar.xaml
+++ b/src/Files.App/UserControls/NavigationToolbar.xaml
@@ -456,14 +456,17 @@
diff --git a/src/Files.App/UserControls/NavigationToolbar.xaml.cs b/src/Files.App/UserControls/NavigationToolbar.xaml.cs
index 56a463cab600..c9fd4c4dd5d2 100644
--- a/src/Files.App/UserControls/NavigationToolbar.xaml.cs
+++ b/src/Files.App/UserControls/NavigationToolbar.xaml.cs
@@ -20,6 +20,9 @@ public sealed partial class NavigationToolbar : UserControl
// Dependency injections
private readonly IUserSettingsService userSettingsService = Ioc.Default.GetRequiredService();
+
+ // Public properties for XAML binding
+ public IUserSettingsService UserSettingsService => userSettingsService;
private readonly MainPageViewModel MainPageViewModel = Ioc.Default.GetRequiredService();
private readonly ICommandManager Commands = Ioc.Default.GetRequiredService();
private readonly StatusCenterViewModel OngoingTasksViewModel = Ioc.Default.GetRequiredService();
diff --git a/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml b/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml
index faa36f1f9419..61ef812be065 100644
--- a/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml
+++ b/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml
@@ -4,22 +4,27 @@
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:animatedvisuals="using:Microsoft.UI.Xaml.Controls.AnimatedVisuals"
+ xmlns:converters="using:Files.App.Converters"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:helpers="using:Files.App.Helpers"
xmlns:local="using:Files.App.UserControls.StatusCenter"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:statuscenter="using:Files.App.Utils.StatusCenter"
- mc:Ignorable="d">
+ mc:Ignorable="d"
+ MaxWidth="600"
+ MinWidth="300">
+
+
-
+
@@ -50,21 +55,32 @@
-
+
+
+
+
+
+
+
@@ -95,7 +111,7 @@
-
+
@@ -126,26 +142,22 @@
-
-
-
-
-
+ VerticalAlignment="Center"
+ x:Load="{x:Bind Header, Converter={StaticResource EmptyStringToBoolConverter}, Mode=OneWay}"
+ MaxLines="2"
+ Style="{StaticResource BodyTextBlockStyle}"
+ Text="{x:Bind Header, Mode=OneWay}"
+ TextTrimming="CharacterEllipsis"
+ TextWrapping="Wrap"
+ HorizontalAlignment="Stretch"
+ ToolTipService.ToolTip="{x:Bind HeaderTooltip, Mode=OneWay}" />
-
+
+
+
+
+
+
+
diff --git a/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs b/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs
index 8798d39d46f5..7e595bf0e1aa 100644
--- a/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs
+++ b/src/Files.App/UserControls/StatusCenter/StatusCenter.xaml.cs
@@ -4,18 +4,40 @@
using CommunityToolkit.WinUI;
using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Controls;
+using Microsoft.UI.Xaml.Input;
+using Files.App.Data.Contracts;
+using Microsoft.UI.Input;
+using Windows.Foundation;
+using Windows.UI.Core;
+using Files.App.Controls;
+using Microsoft.UI.Xaml.Media;
+using Files.App.Views;
namespace Files.App.UserControls.StatusCenter
{
public sealed partial class StatusCenter : UserControl
{
public StatusCenterViewModel ViewModel;
+ private readonly IAppSettingsService AppSettingsService;
+ private Point _initialPosition;
+ private Size _initialSize;
public StatusCenter()
{
InitializeComponent();
ViewModel = Ioc.Default.GetRequiredService();
+ AppSettingsService = Ioc.Default.GetRequiredService();
+
+ // Load initial size from settings
+ Loaded += StatusCenter_Loaded;
+ }
+
+ private void StatusCenter_Loaded(object sender, RoutedEventArgs e)
+ {
+ // Set initial size from settings
+ Width = AppSettingsService.StatusCenterWidth;
+ Height = AppSettingsService.StatusCenterHeight;
}
private void CloseAllItemsButton_Click(object sender, RoutedEventArgs e)
@@ -41,5 +63,79 @@ private void ExpandCollapseChevronItemButton_Click(object sender, RoutedEventArg
item.IsExpanded = !item.IsExpanded;
}
}
+
+ private void ResizeGrip_ManipulationStarted(object sender, ManipulationStartedRoutedEventArgs e)
+ {
+ _initialPosition = e.Position;
+ _initialSize = new Size(Width, Height);
+ e.Handled = true;
+ }
+
+ private void ResizeGrip_ManipulationDelta(object sender, ManipulationDeltaRoutedEventArgs e)
+ {
+ var cumulative = e.Cumulative;
+ var newWidth = _initialSize.Width - cumulative.Translation.X; // Negative because we're resizing from bottom-left
+ var newHeight = _initialSize.Height + cumulative.Translation.Y; // Positive because we're resizing from bottom-left
+
+ // Get available space constraints
+ var availableWidth = GetAvailableWidth();
+ var availableHeight = GetAvailableHeight();
+
+ // Constrain to min/max bounds and available space
+ newWidth = Math.Max(300, Math.Min(Math.Min(600, availableWidth), newWidth));
+ newHeight = Math.Max(200, Math.Min(Math.Min(800, availableHeight), newHeight));
+
+ // Update the StatusCenter control size directly
+ Width = newWidth;
+ Height = newHeight;
+
+ e.Handled = true;
+ }
+
+ private double GetAvailableWidth()
+ {
+ // Get the main window bounds to determine available space
+ var mainWindow = MainWindow.Instance;
+ if (mainWindow != null)
+ {
+ // Account for flyout placement (bottom-right) and some margin
+ return Math.Max(300, mainWindow.Bounds.Width * 0.8); // Max 80% of window width
+ }
+ return 600; // Fallback
+ }
+
+ private double GetAvailableHeight()
+ {
+ // Get the main window bounds to determine available space
+ var mainWindow = MainWindow.Instance;
+ if (mainWindow != null)
+ {
+ // Account for flyout placement (bottom-right) and some margin
+ return Math.Max(200, mainWindow.Bounds.Height * 0.7); // Max 70% of window height
+ }
+ return 800; // Fallback
+ }
+
+ private void ResizeGrip_ManipulationCompleted(object sender, ManipulationCompletedRoutedEventArgs e)
+ {
+ // Save the new dimensions to settings
+ AppSettingsService.StatusCenterWidth = Width;
+ AppSettingsService.StatusCenterHeight = Height;
+ e.Handled = true;
+ }
+
+ private void ResizeGrip_PointerEntered(object sender, PointerRoutedEventArgs e)
+ {
+ // Change cursor to resize cursor
+ var resizeGrip = (FrameworkElement)sender;
+ resizeGrip.ChangeCursor(InputSystemCursor.Create(InputSystemCursorShape.SizeNorthwestSoutheast));
+ }
+
+ private void ResizeGrip_PointerExited(object sender, PointerRoutedEventArgs e)
+ {
+ // Reset cursor to default
+ var resizeGrip = (FrameworkElement)sender;
+ resizeGrip.ChangeCursor(InputSystemCursor.Create(InputSystemCursorShape.Arrow));
+ }
}
}