mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 03:43:52 +00:00
Remove macOS text position fudge factors (no longer needed with wx 3.3)
This commit is contained in:
@@ -182,6 +182,7 @@ void TabButton::render(wxDC &dc)
|
|||||||
pt.y = (size.y - showimg.GetHeight()) / 2;
|
pt.y = (size.y - showimg.GetHeight()) / 2;
|
||||||
dc.DrawBitmap(showimg, pt);
|
dc.DrawBitmap(showimg, pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabButton::messureSize()
|
void TabButton::messureSize()
|
||||||
|
|||||||
@@ -364,14 +364,6 @@ void Button::render(wxDC& dc)
|
|||||||
dc.SetBrush(*wxLIGHT_GREY);
|
dc.SetBrush(*wxLIGHT_GREY);
|
||||||
dc.SetPen(wxPen(*wxLIGHT_GREY));
|
dc.SetPen(wxPen(*wxLIGHT_GREY));
|
||||||
dc.DrawRectangle(pt, textSize.GetSize());
|
dc.DrawRectangle(pt, textSize.GetSize());
|
||||||
#endif
|
|
||||||
#ifdef __WXOSX__
|
|
||||||
pt.y -= this->textSize.x / 2;
|
|
||||||
#endif
|
|
||||||
#ifdef __APPLE__
|
|
||||||
if (Slic3r::is_mac_version_15()) {
|
|
||||||
pt.y -= FromDIP(1);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
dc.DrawText(text, pt);
|
dc.DrawText(text, pt);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,13 +278,11 @@ void SideButton::dorender(wxDC& dc, wxDC& text_dc)
|
|||||||
auto text = GetLabel();
|
auto text = GetLabel();
|
||||||
if (!text.IsEmpty()) {
|
if (!text.IsEmpty()) {
|
||||||
pt.y += (rcContent.height - textSize.y) / 2;
|
pt.y += (rcContent.height - textSize.y) / 2;
|
||||||
#ifdef __APPLE__
|
|
||||||
pt.y -= FromDIP(2);
|
|
||||||
#endif
|
|
||||||
text_dc.SetFont(GetFont());
|
text_dc.SetFont(GetFont());
|
||||||
text_dc.SetTextForeground(text_color.colorForStates(states));
|
text_dc.SetTextForeground(text_color.colorForStates(states));
|
||||||
text_dc.DrawText(text, pt);
|
text_dc.DrawText(text, pt);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SideButton::messureSize()
|
void SideButton::messureSize()
|
||||||
|
|||||||
Reference in New Issue
Block a user