mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-11 16:00:17 -07:00
update dc.DrawBitmap calls to use get_bitmap
This commit is contained in:
parent
e114881ed5
commit
cdff9ba9fa
22 changed files with 75 additions and 75 deletions
|
|
@ -1625,8 +1625,8 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt)
|
|||
|
||||
wxPaintDC dc(this);
|
||||
|
||||
const auto bullet_w = bullet_black.bmp().GetSize().GetWidth();
|
||||
const auto bullet_h = bullet_black.bmp().GetSize().GetHeight();
|
||||
const auto bullet_w = bullet_black.GetWidth();
|
||||
const auto bullet_h = bullet_black.GetHeight();
|
||||
const int yoff_icon = bullet_h < em_h ? (em_h - bullet_h) / 2 : 0;
|
||||
const int yoff_text = bullet_h > em_h ? (bullet_h - em_h) / 2 : 0;
|
||||
const int yinc = item_height();
|
||||
|
|
@ -1639,10 +1639,10 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt)
|
|||
unsigned x = em_w/2 + item.indent * em_w;
|
||||
|
||||
if (i == item_active || (item_hover >= 0 && i == (size_t)item_hover)) {
|
||||
dc.DrawBitmap(bullet_blue.bmp(), x, y + yoff_icon, false);
|
||||
dc.DrawBitmap(bullet_blue.get_bitmap(), x, y + yoff_icon, false);
|
||||
}
|
||||
else if (i < item_active) { dc.DrawBitmap(bullet_black.bmp(), x, y + yoff_icon, false); }
|
||||
else if (i > item_active) { dc.DrawBitmap(bullet_white.bmp(), x, y + yoff_icon, false); }
|
||||
else if (i < item_active) { dc.DrawBitmap(bullet_black.get_bitmap(), x, y + yoff_icon, false); }
|
||||
else if (i > item_active) { dc.DrawBitmap(bullet_white.get_bitmap(), x, y + yoff_icon, false); }
|
||||
|
||||
x += + bullet_w + em_w/2;
|
||||
const auto text_size = dc.GetTextExtent(item.label);
|
||||
|
|
@ -1655,7 +1655,7 @@ void ConfigWizardIndex::on_paint(wxPaintEvent & evt)
|
|||
|
||||
//draw logo
|
||||
if (int y = size.y - bg.GetBmpHeight(); y>=0) {
|
||||
dc.DrawBitmap(bg.bmp(), 0, y, false);
|
||||
dc.DrawBitmap(bg.get_bitmap(), 0, y, false);
|
||||
index_width = std::max(index_width, bg.GetBmpWidth() + em_w / 2);
|
||||
}
|
||||
|
||||
|
|
@ -1689,7 +1689,7 @@ void ConfigWizardIndex::msw_rescale()
|
|||
em_h = size.y;
|
||||
|
||||
bg.msw_rescale();
|
||||
SetMinSize(bg.bmp().GetSize());
|
||||
SetMinSize(bg.GetSize());
|
||||
|
||||
bullet_black.msw_rescale();
|
||||
bullet_blue.msw_rescale();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue