mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-02-22 20:42:34 -07:00
FIX:Optimize display of ImageDPIFrame
jira: STUDIO-12783 Change-Id: I65bb9f6d1f70f921717acdf1dd24ab1d6e936e80 (cherry picked from commit 83594b82e0a9917d9be3f8cc54c2aa14d0f6bc57)
This commit is contained in:
parent
12725f763c
commit
fad8043f5e
1 changed files with 17 additions and 0 deletions
|
|
@ -81,6 +81,23 @@ void ImageDPIFrame::on_timer(wxTimerEvent &event)
|
|||
Raise();
|
||||
}
|
||||
m_timer_count++;
|
||||
}else{
|
||||
wxPoint mouse_pos = wxGetMousePosition();
|
||||
wxRect window_rect = GetScreenRect();
|
||||
|
||||
wxPoint center(window_rect.x + window_rect.width / 2, window_rect.y + window_rect.height / 2);
|
||||
int half_width = window_rect.width / 2;
|
||||
int half_height = window_rect.height / 2;
|
||||
wxRect expanded_rect(
|
||||
center.x - half_width * 2,
|
||||
center.y - half_height * 2,
|
||||
window_rect.width * 2,
|
||||
window_rect.height * 2
|
||||
);
|
||||
|
||||
if (!expanded_rect.Contains(mouse_pos)) {
|
||||
on_hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue