mirror of
https://github.com/nsnail/dot.git
synced 2025-06-18 05:23:21 +08:00
<fix> 信息窗口避开鼠标指针指向区域
This commit is contained in:
parent
8a72e31ece
commit
5678fa68cb
@ -27,6 +27,7 @@ public class WinInfo : Form
|
|||||||
_graphics.InterpolationMode = InterpolationMode.NearestNeighbor; //指定最临近插值法,禁止平滑缩放(模糊)
|
_graphics.InterpolationMode = InterpolationMode.NearestNeighbor; //指定最临近插值法,禁止平滑缩放(模糊)
|
||||||
_graphics.CompositingQuality = CompositingQuality.HighQuality;
|
_graphics.CompositingQuality = CompositingQuality.HighQuality;
|
||||||
_graphics.SmoothingMode = SmoothingMode.None;
|
_graphics.SmoothingMode = SmoothingMode.None;
|
||||||
|
_pbox.MouseEnter += PboxOnMouseEnter;
|
||||||
Controls.Add(_pbox);
|
Controls.Add(_pbox);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,6 +37,12 @@ public class WinInfo : Form
|
|||||||
Dispose(false);
|
Dispose(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void PboxOnMouseEnter(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
// 信息窗口避开鼠标指针指向区域
|
||||||
|
Location = new Point(Location.X, Location.Y == 0 ? Screen.PrimaryScreen!.Bounds.Height - _WINDOW_SIZE : 0);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
protected override void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
base.Dispose(disposing);
|
base.Dispose(disposing);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user