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}" /> - +