mirror of
https://github.com/LorenzCK/OnTopReplica.git
synced 2024-05-21 04:43:55 +12:00
Fixed issue #20 (opacity / fullscreen switching bug).
This commit is contained in:
parent
4abb6f4a7d
commit
f340fa546c
|
@ -85,7 +85,7 @@ namespace OnTopReplica {
|
|||
};
|
||||
|
||||
foreach (ToolStripMenuItem i in items) {
|
||||
if ((double)i.Tag == this.Opacity)
|
||||
if (((double)i.Tag) == this.Opacity)
|
||||
i.Checked = true;
|
||||
else
|
||||
i.Checked = false;
|
||||
|
@ -96,9 +96,10 @@ namespace OnTopReplica {
|
|||
//Get clicked menu item
|
||||
ToolStripMenuItem tsi = sender as ToolStripMenuItem;
|
||||
|
||||
if (tsi != null) {
|
||||
if (tsi != null && this.Visible) {
|
||||
//Get opacity from the tag
|
||||
this.Opacity = (double)tsi.Tag;
|
||||
Program.Platform.OnFormStateChange(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OnTopReplica.Platforms {
|
|||
//Note that when minimized, it will be shown as an (ugly) minimized tool window
|
||||
//thus we do not minimize, but set to transparent when hiding
|
||||
WindowMethods.SetWindowLong(form.Handle, WindowMethods.WindowLong.ExStyle,
|
||||
(IntPtr)WindowMethods.WindowExStyles.ToolWindow);
|
||||
(IntPtr)(WindowMethods.WindowExStyles.ToolWindow | WindowMethods.WindowExStyles.Layered));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue