mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 11:23:42 +00:00
FIX:Optimize display of ImageDPIFrame
jira: STUDIO-12783 Change-Id: I65bb9f6d1f70f921717acdf1dd24ab1d6e936e80 (cherry picked from commit 83594b82e0a9917d9be3f8cc54c2aa14d0f6bc57)
This commit is contained in:
@@ -81,6 +81,23 @@ void ImageDPIFrame::on_timer(wxTimerEvent &event)
|
|||||||
Raise();
|
Raise();
|
||||||
}
|
}
|
||||||
m_timer_count++;
|
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();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user