Skip to content

Commit a907a2b

Browse files
committed
Reduce taskbar display is now optional
1 parent 44f9a4c commit a907a2b

File tree

12 files changed

+125
-12
lines changed

12 files changed

+125
-12
lines changed

Sources/SmartTaskbar.Win10/App.config

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<configuration>
44
<configSections>
55
<sectionGroup name="userSettings"
6-
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
6+
type="System.Configuration.UserSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
77
<section name="SmartTaskbar.Properties.Settings"
8-
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
9-
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
8+
type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
9+
allowExeDefinition="MachineToLocalUser" requirePermission="false" />
1010
</sectionGroup>
1111
</configSections>
1212
<startup>
@@ -17,12 +17,15 @@
1717
</System.Windows.Forms.ApplicationConfigurationSection>
1818
<userSettings>
1919
<SmartTaskbar.Properties.Settings>
20-
<setting name="AutoModeType" serializeAs="String">
21-
<value>Display</value>
22-
</setting>
23-
<setting name="ShowTaskbarWhenExit" serializeAs="String">
24-
<value>True</value>
25-
</setting>
26-
</SmartTaskbar.Properties.Settings>
20+
<setting name="AutoModeType" serializeAs="String">
21+
<value>Display</value>
22+
</setting>
23+
<setting name="ShowTaskbarWhenExit" serializeAs="String">
24+
<value>True</value>
25+
</setting>
26+
<setting name="ReduceTaskbarDisplay" serializeAs="String">
27+
<value>False</value>
28+
</setting>
29+
</SmartTaskbar.Properties.Settings>
2730
</userSettings>
2831
</configuration>

Sources/SmartTaskbar.Win10/Languages/LangName.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ public static class LangName
66

77
public const string Animation = "tray_animation";
88

9+
public const string ReduceTaskbarDisplay = "tray_reduceTaskbarDisplay";
10+
911
public const string Auto = "tray_auto";
1012

1113
public const string ShowBarOnExit = "tray_showBarOnExit";

Sources/SmartTaskbar.Win10/Languages/Resource.en-US.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
<data name="tray_exit" xml:space="preserve">
130130
<value>Exit</value>
131131
</data>
132+
<data name="tray_reduceTaskbarDisplay" xml:space="preserve">
133+
<value>Reduce taskbar display</value>
134+
</data>
132135
<data name="tray_showBarOnExit" xml:space="preserve">
133136
<value>Show the taskbar after exit</value>
134137
</data>

Sources/SmartTaskbar.Win10/Languages/Resource.ru-RU.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
<data name="tray_exit" xml:space="preserve">
130130
<value>Выход</value>
131131
</data>
132+
<data name="tray_reduceTaskbarDisplay" xml:space="preserve">
133+
<value>Reduce taskbar display</value>
134+
</data>
132135
<data name="tray_showBarOnExit" xml:space="preserve">
133136
<value>Show the taskbar after exit</value>
134137
</data>

Sources/SmartTaskbar.Win10/Languages/Resource.uk-UA.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
<data name="tray_exit" xml:space="preserve">
130130
<value>Вихід</value>
131131
</data>
132+
<data name="tray_reduceTaskbarDisplay" xml:space="preserve">
133+
<value>Reduce taskbar display</value>
134+
</data>
132135
<data name="tray_showBarOnExit" xml:space="preserve">
133136
<value>Show the taskbar after exit</value>
134137
</data>

Sources/SmartTaskbar.Win10/Languages/Resource.zh-CN.resx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,9 @@
129129
<data name="tray_exit" xml:space="preserve">
130130
<value>退出</value>
131131
</data>
132+
<data name="tray_reduceTaskbarDisplay" xml:space="preserve">
133+
<value>减少任务栏显示</value>
134+
</data>
132135
<data name="tray_showBarOnExit" xml:space="preserve">
133136
<value>退出后显示任务栏</value>
134137
</data>

Sources/SmartTaskbar.Win10/Models/UserConfiguration.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,10 @@ internal struct UserConfiguration
1414
/// Show taskbar when exiting
1515
/// </summary>
1616
public bool ShowTaskbarWhenExit { get; set; }
17+
18+
/// <summary>
19+
/// Hide the taskbar when any windows intersect
20+
/// </summary>
21+
public bool ReduceTaskbarDisplay { get; set; }
1722
}
1823
}

Sources/SmartTaskbar.Win10/Models/UserSettings.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ static UserSettings()
1414
=> _userConfiguration = new UserConfiguration
1515
{
1616
AutoModeType = Settings.Default.AutoModeType.AsAutoModeType(),
17-
ShowTaskbarWhenExit = Settings.Default.ShowTaskbarWhenExit
17+
ShowTaskbarWhenExit = Settings.Default.ShowTaskbarWhenExit,
18+
ReduceTaskbarDisplay = Settings.Default.ReduceTaskbarDisplay
1819
};
1920

2021
public static AutoModeType AutoModeType
@@ -31,6 +32,20 @@ public static AutoModeType AutoModeType
3132
}
3233
}
3334

35+
public static bool ReduceTaskbarDisplay
36+
{
37+
get => _userConfiguration.ReduceTaskbarDisplay;
38+
set
39+
{
40+
if (value == _userConfiguration.ReduceTaskbarDisplay)
41+
return;
42+
43+
_userConfiguration.ReduceTaskbarDisplay = value;
44+
Settings.Default.ReduceTaskbarDisplay = value;
45+
Settings.Default.Save();
46+
}
47+
}
48+
3449
public static bool ShowTaskbarWhenExit
3550
{
3651
get => _userConfiguration.ShowTaskbarWhenExit;

Sources/SmartTaskbar.Win10/Properties/Settings.Designer.cs

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/SmartTaskbar.Win10/Properties/Settings.settings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@
88
<Setting Name="ShowTaskbarWhenExit" Type="System.Boolean" Scope="User">
99
<Value Profile="(Default)">True</Value>
1010
</Setting>
11+
<Setting Name="ReduceTaskbarDisplay" Type="System.Boolean" Scope="User">
12+
<Value Profile="(Default)">False</Value>
13+
</Setting>
1114
</Settings>
1215
</SettingsFile>

0 commit comments

Comments
 (0)