Skip to content

Commit 5880899

Browse files
committed
Feature: Option to hide the bottom status bar
1 parent c65a77f commit 5880899

File tree

6 files changed

+47
-2
lines changed

6 files changed

+47
-2
lines changed

src/Files.App/Data/Contracts/IAppearanceSettingsService.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@ public interface IAppearanceSettingsService : IBaseSettingsService, INotifyPrope
101101
/// Gets or sets a value whether the toolbar should be displayed.
102102
/// </summary>
103103
bool ShowToolbar { get; set; }
104-
104+
105+
/// <summary>
106+
/// Gets or sets a value whether the status bar should be displayed.
107+
/// </summary>
108+
bool ShowStatusBar { get; set; }
109+
105110
/// <summary>
106111
/// Gets or sets a value whether the tab actions button should be displayed.
107112
/// </summary>

src/Files.App/Services/Settings/AppearanceSettingsService.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ public bool ShowToolbar
138138
set => Set(value);
139139
}
140140

141+
/// <inheritdoc/>
142+
public bool ShowStatusBar
143+
{
144+
get => Get(true);
145+
set => Set(value);
146+
}
147+
141148
/// <inheritdoc/>
142149
public bool ShowTabActions
143150
{

src/Files.App/Strings/en-US/Resources.resw

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4258,4 +4258,7 @@
42584258
<data name="SeeMore" xml:space="preserve">
42594259
<value>See more</value>
42604260
</data>
4261-
</root>
4261+
<data name="ShowStatusBar" xml:space="preserve">
4262+
<value>Show status bar at the bottom</value>
4263+
</data>
4264+
</root>

src/Files.App/ViewModels/MainPageViewModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ context.PageType is not ContentPageTypes.ReleaseNotes &&
126126
context.PageType is not ContentPageTypes.Settings;
127127

128128
public bool ShowStatusBar =>
129+
AppearanceSettingsService.ShowStatusBar &&
129130
context.PageType is not ContentPageTypes.Home &&
130131
context.PageType is not ContentPageTypes.ReleaseNotes &&
131132
context.PageType is not ContentPageTypes.Settings;
@@ -178,6 +179,9 @@ public MainPageViewModel()
178179
case nameof(AppearanceSettingsService.ShowToolbar):
179180
OnPropertyChanged(nameof(ShowToolbar));
180181
break;
182+
case nameof(AppearanceSettingsService.ShowStatusBar):
183+
OnPropertyChanged(nameof(ShowStatusBar));
184+
break;
181185
}
182186
};
183187

src/Files.App/ViewModels/Settings/AppearanceViewModel.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,20 @@ public bool ShowToolbar
295295
}
296296
}
297297

298+
public bool ShowStatusBar
299+
{
300+
get => UserSettingsService.AppearanceSettingsService.ShowStatusBar;
301+
set
302+
{
303+
if (value != UserSettingsService.AppearanceSettingsService.ShowStatusBar)
304+
{
305+
UserSettingsService.AppearanceSettingsService.ShowStatusBar = value;
306+
307+
OnPropertyChanged();
308+
}
309+
}
310+
}
311+
298312
public bool ShowTabActions
299313
{
300314
get => UserSettingsService.AppearanceSettingsService.ShowTabActions;

src/Files.App/Views/Settings/AppearancePage.xaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,18 @@
243243
IsOn="{x:Bind ViewModel.ShowTabActions, Mode=TwoWay}" />
244244
</wctcontrols:SettingsCard>
245245

246+
<!-- Show Status bar -->
247+
<wctcontrols:SettingsCard Header="{helpers:ResourceString Name=ShowStatusBar}">
248+
<wctcontrols:SettingsCard.HeaderIcon>
249+
<!-- TODO: needs a new icon -->
250+
<PathIcon Data="{StaticResource App.Theme.PathIcon.TabActions}" />
251+
</wctcontrols:SettingsCard.HeaderIcon>
252+
<ToggleSwitch
253+
AutomationProperties.AutomationControlType="Custom"
254+
AutomationProperties.Name="{helpers:ResourceString Name=ShowStatusBar}"
255+
IsOn="{x:Bind ViewModel.ShowStatusBar, Mode=TwoWay}" />
256+
</wctcontrols:SettingsCard>
257+
246258
<!-- Toolbar -->
247259
<wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=Toolbars}">
248260
<wctcontrols:SettingsExpander.HeaderIcon>

0 commit comments

Comments
 (0)