mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-01 19:14:02 -06:00
Revert to WxWidgets 3.1.5 (#3249)
* revert to WxWidgets 3.1.5 * update nanosvg unicode path
This commit is contained in:
parent
cc23ec6626
commit
374f78c768
95 changed files with 6841 additions and 1618 deletions
|
@ -46,7 +46,7 @@ void StaticLine::SetLineColour(wxColour color)
|
|||
void StaticLine::Rescale()
|
||||
{
|
||||
if (this->icon.bmp().IsOk())
|
||||
this->icon.sys_color_changed();
|
||||
this->icon.msw_rescale();
|
||||
messureSize();
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ void StaticLine::messureSize()
|
|||
// BBS norrow size between text and icon
|
||||
szContent.x += 5;
|
||||
}
|
||||
wxSize szIcon = this->icon.GetSize();
|
||||
wxSize szIcon = this->icon.GetBmpSize();
|
||||
szContent.x += szIcon.x;
|
||||
if (szIcon.y > szContent.y) szContent.y = szIcon.y;
|
||||
}
|
||||
|
@ -90,13 +90,13 @@ void StaticLine::render(wxDC& dc)
|
|||
auto label = GetLabel();
|
||||
if (!label.IsEmpty()) textSize = dc.GetTextExtent(label);
|
||||
wxRect titleRect{{0, 0}, size};
|
||||
titleRect.height = wxMax(icon.GetHeight(), textSize.GetHeight());
|
||||
int contentWidth = icon.GetWidth() + ((icon.bmp().IsOk() && textSize.GetWidth() > 0) ? 5 : 0) +
|
||||
titleRect.height = wxMax(icon.GetBmpHeight(), textSize.GetHeight());
|
||||
int contentWidth = icon.GetBmpWidth() + ((icon.bmp().IsOk() && textSize.GetWidth() > 0) ? 5 : 0) +
|
||||
textSize.GetWidth();
|
||||
if (vertical) titleRect.Deflate((size.GetWidth() - contentWidth) / 2, 0);
|
||||
if (icon.bmp().IsOk()) {
|
||||
dc.DrawBitmap(icon.get_bitmap(), {0, (size.y - icon.GetHeight()) / 2});
|
||||
titleRect.x += icon.GetWidth() + 5;
|
||||
dc.DrawBitmap(icon.bmp(), {0, (size.y - icon.GetBmpHeight()) / 2});
|
||||
titleRect.x += icon.GetBmpWidth() + 5;
|
||||
}
|
||||
if (!label.IsEmpty()) {
|
||||
dc.SetTextForeground(StateColor::darkModeColorFor(GetForegroundColour()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue