mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-27 01:58:36 -07:00
FIX:fix mac display
jira: STUDIO-11041 Change-Id: Ib9dcd9e033fa635e82e74f42105185a1d9139062 (cherry picked from commit 563bb3dffc1c36b11236b6a42b626abd35ed60bf)
This commit is contained in:
parent
9beeec9b83
commit
ef876da0ce
1 changed files with 5 additions and 5 deletions
|
|
@ -22,11 +22,9 @@ SideButton::SideButton(wxWindow* parent, wxString text, wxString icon, long stly
|
|||
extra_size = wxSize(38, 10);
|
||||
text_margin = 15;
|
||||
#endif
|
||||
|
||||
|
||||
icon_offset = 0;
|
||||
text_orientation = HO_Left;
|
||||
|
||||
|
||||
|
||||
border_color.append(0x6B6B6B, StateColor::Disabled);
|
||||
border_color.append(wxColour(0, 137, 123), StateColor::Pressed);
|
||||
|
|
@ -208,7 +206,7 @@ void SideButton::dorender(wxDC& dc, wxDC& text_dc)
|
|||
dc.SetPen(wxPen(border_color.colorForStates(states)));
|
||||
int pen_width = dc.GetPen().GetWidth();
|
||||
|
||||
|
||||
|
||||
// draw icon style
|
||||
if (icon.bmp().IsOk()) {
|
||||
if (radius > 1e-5) {
|
||||
|
|
@ -280,7 +278,9 @@ void SideButton::dorender(wxDC& dc, wxDC& text_dc)
|
|||
auto text = GetLabel();
|
||||
if (!text.IsEmpty()) {
|
||||
pt.y += (rcContent.height - textSize.y) / 2;
|
||||
|
||||
#ifdef __APPLE__
|
||||
pt.y -= FromDIP(2);
|
||||
#endif
|
||||
text_dc.SetFont(GetFont());
|
||||
text_dc.SetTextForeground(text_color.colorForStates(states));
|
||||
text_dc.DrawText(text, pt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue