mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 09:17:52 -06:00
FIX:fixed users can not click drop-down menu on mac
Change-Id: Ib9ac9e323d70f5be32a7d1bd935effba974ef006
This commit is contained in:
parent
196f20fbc9
commit
01744f1759
2 changed files with 13 additions and 1 deletions
|
@ -14,10 +14,17 @@ SideButton::SideButton(wxWindow* parent, wxString text, wxString icon, long stly
|
|||
, state_handler(this)
|
||||
{
|
||||
radius = 12;
|
||||
#ifdef __APPLE__
|
||||
extra_size = wxSize(38 + FromDIP(20), 10);
|
||||
text_margin = 15 + FromDIP(20);
|
||||
#else
|
||||
extra_size = wxSize(38, 10);
|
||||
text_margin = 15;
|
||||
#endif
|
||||
|
||||
icon_offset = 0;
|
||||
text_orientation = HO_Left;
|
||||
text_margin = 15;
|
||||
|
||||
|
||||
|
||||
border_color.append(0x6B6B6B, StateColor::Disabled);
|
||||
|
|
|
@ -50,6 +50,11 @@ void SidePopup::Popup(wxWindow* focus)
|
|||
}
|
||||
if (focus) {
|
||||
wxPoint pos = focus->ClientToScreen(wxPoint(0, -6));
|
||||
|
||||
#ifdef __APPLE__
|
||||
pos.x = pos.x - FromDIP(20);
|
||||
#endif // __APPLE__
|
||||
|
||||
if (pos.x + max_width > screenwidth)
|
||||
Position({pos.x - (pos.x + max_width - screenwidth),pos.y}, {0, focus->GetSize().y + 12});
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue