[Feature] Option to turn off menu fading (#310), version

This commit is contained in:
Markus Hofknecht 2022-02-04 22:10:39 +01:00
parent 754830eda4
commit 4ad0e3c7a2
5 changed files with 29 additions and 9 deletions

View file

@ -92,7 +92,8 @@ namespace SystemTrayMenu.Helper
opacity = 0;
ChangeOpacity?.Invoke(this, opacity);
}
else if (opacity < ShownMinus)
else if (Properties.Settings.Default.UseFading &&
opacity < ShownMinus)
{
opacity += StepIn;
ChangeOpacity?.Invoke(this, opacity);
@ -113,12 +114,14 @@ namespace SystemTrayMenu.Helper
opacity = 0;
ChangeOpacity?.Invoke(this, opacity);
}
else if (opacity < TransparentMinus)
else if (Properties.Settings.Default.UseFading &&
opacity < TransparentMinus)
{
opacity += StepIn;
ChangeOpacity?.Invoke(this, opacity);
}
else if (opacity > TransparentPlus)
else if (Properties.Settings.Default.UseFading &&
opacity > TransparentPlus)
{
opacity -= StepOut;
ChangeOpacity?.Invoke(this, opacity);
@ -131,7 +134,8 @@ namespace SystemTrayMenu.Helper
break;
case FadingState.Hide:
if (opacity > StepOut)
if (Properties.Settings.Default.UseFading &&
opacity > StepOut)
{
opacity -= StepOut;
ChangeOpacity?.Invoke(this, opacity);

View file

@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.3.3")]
[assembly: AssemblyFileVersion("1.2.3.3")]
[assembly: AssemblyVersion("1.2.3.4")]
[assembly: AssemblyFileVersion("1.2.3.4")]

View file

@ -506,7 +506,23 @@ namespace SystemTrayMenu.Properties
this["UseCustomLocation"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("True")]
public bool UseFading
{
get
{
return ((bool)(this["UseFading"]));
}
set
{
this["UseFading"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]

View file

@ -199,6 +199,6 @@ Sponsors - Thank you!
* Stefan Mahrer
* Ralf K.
* [donaldaken](https://github.com/donaldaken)
* Marc S.
* Marc Speer
* [Traditional_Tap3954](https://www.reddit.com/user/Traditional_Tap3954/)
* Maximilian H.

View file

@ -121,7 +121,7 @@ Sponsors - Thank you!
* Stefan Mahrer
* Ralf K.
* donaldaken
* Marc S.
* Marc Speer
* Traditional_Tap3954
* Maximilian H.
";