mirror of
https://github.com/Hofknecht/SystemTrayMenu.git
synced 2024-05-29 16:49:36 +12:00
[Feature] Option to turn off menu fading (#310), version
This commit is contained in:
parent
754830eda4
commit
4ad0e3c7a2
|
@ -92,7 +92,8 @@ namespace SystemTrayMenu.Helper
|
||||||
opacity = 0;
|
opacity = 0;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
}
|
}
|
||||||
else if (opacity < ShownMinus)
|
else if (Properties.Settings.Default.UseFading &&
|
||||||
|
opacity < ShownMinus)
|
||||||
{
|
{
|
||||||
opacity += StepIn;
|
opacity += StepIn;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
|
@ -113,12 +114,14 @@ namespace SystemTrayMenu.Helper
|
||||||
opacity = 0;
|
opacity = 0;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
}
|
}
|
||||||
else if (opacity < TransparentMinus)
|
else if (Properties.Settings.Default.UseFading &&
|
||||||
|
opacity < TransparentMinus)
|
||||||
{
|
{
|
||||||
opacity += StepIn;
|
opacity += StepIn;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
}
|
}
|
||||||
else if (opacity > TransparentPlus)
|
else if (Properties.Settings.Default.UseFading &&
|
||||||
|
opacity > TransparentPlus)
|
||||||
{
|
{
|
||||||
opacity -= StepOut;
|
opacity -= StepOut;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
|
@ -131,7 +134,8 @@ namespace SystemTrayMenu.Helper
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case FadingState.Hide:
|
case FadingState.Hide:
|
||||||
if (opacity > StepOut)
|
if (Properties.Settings.Default.UseFading &&
|
||||||
|
opacity > StepOut)
|
||||||
{
|
{
|
||||||
opacity -= StepOut;
|
opacity -= StepOut;
|
||||||
ChangeOpacity?.Invoke(this, opacity);
|
ChangeOpacity?.Invoke(this, opacity);
|
||||||
|
|
|
@ -39,5 +39,5 @@ using System.Runtime.InteropServices;
|
||||||
// You can specify all the values or you can default the Build and Revision Numbers
|
// You can specify all the values or you can default the Build and Revision Numbers
|
||||||
// by using the '*' as shown below:
|
// by using the '*' as shown below:
|
||||||
// [assembly: AssemblyVersion("1.0.*")]
|
// [assembly: AssemblyVersion("1.0.*")]
|
||||||
[assembly: AssemblyVersion("1.2.3.3")]
|
[assembly: AssemblyVersion("1.2.3.4")]
|
||||||
[assembly: AssemblyFileVersion("1.2.3.3")]
|
[assembly: AssemblyFileVersion("1.2.3.4")]
|
||||||
|
|
18
Properties/Settings.Designer.cs
generated
18
Properties/Settings.Designer.cs
generated
|
@ -506,7 +506,23 @@ namespace SystemTrayMenu.Properties
|
||||||
this["UseCustomLocation"] = value;
|
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.UserScopedSettingAttribute()]
|
||||||
[global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))]
|
[global::System.Configuration.SettingsProviderAttribute(typeof(CustomSettingsProvider))]
|
||||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||||
|
|
|
@ -199,6 +199,6 @@ Sponsors - Thank you!
|
||||||
* Stefan Mahrer
|
* Stefan Mahrer
|
||||||
* Ralf K.
|
* Ralf K.
|
||||||
* [donaldaken](https://github.com/donaldaken)
|
* [donaldaken](https://github.com/donaldaken)
|
||||||
* Marc S.
|
* Marc Speer
|
||||||
* [Traditional_Tap3954](https://www.reddit.com/user/Traditional_Tap3954/)
|
* [Traditional_Tap3954](https://www.reddit.com/user/Traditional_Tap3954/)
|
||||||
* Maximilian H.
|
* Maximilian H.
|
||||||
|
|
|
@ -121,7 +121,7 @@ Sponsors - Thank you!
|
||||||
* Stefan Mahrer
|
* Stefan Mahrer
|
||||||
* Ralf K.
|
* Ralf K.
|
||||||
* donaldaken
|
* donaldaken
|
||||||
* Marc S.
|
* Marc Speer
|
||||||
* Traditional_Tap3954
|
* Traditional_Tap3954
|
||||||
* Maximilian H.
|
* Maximilian H.
|
||||||
";
|
";
|
||||||
|
|
Loading…
Reference in a new issue