mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-11 16:00:17 -07:00
Update names in wxExtensions
-Rename msw_rescale to sys_color_changed -Replace GetBmpSize, GetBmpWidth, GetBmpHeight with renamed version (same name without "Bmp") Both of these changes were also made by PrusaSlicer. Original Commit: Prusa3D/PrusaSlicer@066b567 Co-authored-by: YuSanka <yusanka@gmail.com>
This commit is contained in:
parent
3b5c571b1c
commit
01398dd848
37 changed files with 241 additions and 249 deletions
|
|
@ -110,12 +110,12 @@ void ImageSwitchButton::render(wxDC& dc)
|
|||
wxSize szContent = textSize;
|
||||
ScalableBitmap &icon = GetValue() ? m_on : m_off;
|
||||
|
||||
int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||
int content_height = icon.GetHeight() + textSize.y + m_padding;
|
||||
|
||||
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
||||
wxPoint pt = wxPoint((size.x - icon.GetWidth()) / 2, (size.y - content_height) / 2);
|
||||
if (icon.bmp().IsOk()) {
|
||||
dc.DrawBitmap(icon.get_bitmap(), pt);
|
||||
pt.y += m_padding + icon.GetBmpHeight();
|
||||
pt.y += m_padding + icon.GetHeight();
|
||||
}
|
||||
pt.x = (size.x - textSize.x) / 2;
|
||||
dc.SetFont(GetFont());
|
||||
|
|
@ -273,7 +273,7 @@ void FanSwitchButton::render(wxDC& dc)
|
|||
//int content_height = icon.GetBmpHeight() + textSize.y + m_padding;
|
||||
int content_height = m_padding;
|
||||
|
||||
wxPoint pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, (size.y - content_height) / 2);
|
||||
wxPoint pt = wxPoint((size.x - icon.GetWidth()) / 2, (size.y - content_height) / 2);
|
||||
|
||||
pt.x = (size.x - textSize.x) / 2;
|
||||
dc.SetFont(GetFont());
|
||||
|
|
@ -298,10 +298,10 @@ void FanSwitchButton::render(wxDC& dc)
|
|||
dc.DrawText(fina_txt, wxPoint(pt.x, content_height));
|
||||
}
|
||||
|
||||
pt = wxPoint((size.x - icon.GetBmpWidth()) / 2, content_height + textSize.y);
|
||||
pt = wxPoint((size.x - icon.GetWidth()) / 2, content_height + textSize.y);
|
||||
if (icon.bmp().IsOk()) {
|
||||
dc.DrawBitmap(icon.get_bitmap(), pt);
|
||||
pt.y += m_padding + icon.GetBmpHeight();
|
||||
pt.y += m_padding + icon.GetHeight();
|
||||
}
|
||||
|
||||
auto speed = wxString::Format("%d%%", m_speed);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue