mirror of
https://github.com/ShareX/ShareX.git
synced 2024-09-28 23:42:13 +12:00
fixed #7300: Fixed Pin to screen auto hide issue
This commit is contained in:
parent
a17a1f3047
commit
6d353451be
3 changed files with 9 additions and 3 deletions
|
@ -35,6 +35,7 @@ private void InitializeComponent()
|
||||||
this.tsbOptions,
|
this.tsbOptions,
|
||||||
this.tsbClose});
|
this.tsbClose});
|
||||||
this.tsMain.Name = "tsMain";
|
this.tsMain.Name = "tsMain";
|
||||||
|
this.tsMain.MouseLeave += new System.EventHandler(this.tsMain_MouseLeave);
|
||||||
//
|
//
|
||||||
// tsbCopy
|
// tsbCopy
|
||||||
//
|
//
|
||||||
|
|
|
@ -214,9 +214,9 @@ protected override void Dispose(bool disposing)
|
||||||
|
|
||||||
private void UpdateControls()
|
private void UpdateControls()
|
||||||
{
|
{
|
||||||
int toolbarMargin = 10;
|
int toolbarMargin = 20;
|
||||||
tsMain.Visible = ClientRectangle.Contains(PointToClient(MousePosition)) &&
|
tsMain.Visible = ClientRectangle.Contains(PointToClient(MousePosition)) &&
|
||||||
ClientRectangle.Contains(new Rectangle(0, 0, (Options.Border ? Options.BorderSize * 2 : 0) + tsMain.Width + toolbarMargin * 2,
|
ClientRectangle.Contains(new Rectangle(0, 0, (Options.Border ? Options.BorderSize * 2 : 0) + tsMain.Width + toolbarMargin,
|
||||||
(Options.Border ? Options.BorderSize * 2 : 0) + tsMain.Height + toolbarMargin));
|
(Options.Border ? Options.BorderSize * 2 : 0) + tsMain.Height + toolbarMargin));
|
||||||
tslScale.Text = ImageScale + "%";
|
tslScale.Text = ImageScale + "%";
|
||||||
}
|
}
|
||||||
|
@ -501,6 +501,11 @@ private void PinToScreenForm_MouseLeave(object sender, EventArgs e)
|
||||||
UpdateControls();
|
UpdateControls();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void tsMain_MouseLeave(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
UpdateControls();
|
||||||
|
}
|
||||||
|
|
||||||
private void PinToScreenForm_KeyUp(object sender, KeyEventArgs e)
|
private void PinToScreenForm_KeyUp(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
switch (e.KeyData)
|
switch (e.KeyData)
|
||||||
|
|
|
@ -181,7 +181,7 @@
|
||||||
<value>tsMain</value>
|
<value>tsMain</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>tsMain.Type" xml:space="preserve">
|
<data name=">>tsMain.Type" xml:space="preserve">
|
||||||
<value>ShareX.HelpersLib.ToolStripEx, ShareX.HelpersLib, Version=15.0.1.0, Culture=neutral, PublicKeyToken=null</value>
|
<value>ShareX.HelpersLib.ToolStripEx, ShareX.HelpersLib, Version=16.0.1.0, Culture=neutral, PublicKeyToken=null</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>tsMain.Parent" xml:space="preserve">
|
<data name=">>tsMain.Parent" xml:space="preserve">
|
||||||
<value>$this</value>
|
<value>$this</value>
|
||||||
|
|
Loading…
Reference in a new issue