update a few todos

This commit is contained in:
Ocraftyone 2023-11-13 13:54:13 -05:00
parent 62d689b03e
commit cbbeb55989
No known key found for this signature in database
GPG key ID: 85836ED21AD4D125
4 changed files with 6 additions and 8 deletions

View file

@ -46,7 +46,7 @@ void DragCanvas::set_shape_list(const std::vector<std::string>& colors, const st
m_dragshape_list.clear();
for (int i = 0; i < order.size(); i++) {
wxBitmap bmp = get_extruder_color_icon(colors[order[i] - 1], std::to_string(order[i]), SHAPE_SIZE, SHAPE_SIZE)->GetBitmapFor(m_parent); //OcraftyoneTODO: quick and dirty conversion
wxBitmap bmp = get_extruder_color_icon(colors[order[i] - 1], std::to_string(order[i]), SHAPE_SIZE, SHAPE_SIZE)->GetBitmapFor(m_parent);
DragShape* shape = new DragShape(bmp, order[i]);
m_dragshape_list.push_back(shape);
}

View file

@ -77,9 +77,9 @@ void GridCellIconRenderer::Draw(wxGrid& grid,
table->m_icon_row_height = grid.GetRowSize(row);
table->m_icon_col_width = grid.GetColSize(col);
//}
wxBitmapBundle& bitmap = table->get_undo_bitmap();
int bitmap_width = bitmap.GetBitmapFor(dc.GetWindow()).GetWidth();
int bitmap_height = bitmap.GetBitmapFor(dc.GetWindow()).GetHeight();
wxBitmap bitmap = table->get_undo_bitmap().GetBitmapFor(dc.GetWindow());
int bitmap_width = bitmap.GetWidth();
int bitmap_height = bitmap.GetHeight();
int offset_x = (table->m_icon_col_width - bitmap_width)/2;
int offset_y = (table->m_icon_row_height - bitmap_height)/2;
@ -91,7 +91,7 @@ void GridCellIconRenderer::Draw(wxGrid& grid,
lock_pos.y += top;
dc.DrawBitmap(bitmap, lock_pos);
#else
dc.DrawBitmap(bitmap.GetBitmapFor(dc.GetWindow()), wxPoint(rect.x + offset_x, rect.y + offset_y));//OcraftyoneTODO: determine if this way of getting bitmap works well
dc.DrawBitmap(bitmap, wxPoint(rect.x + offset_x, rect.y + offset_y));
#endif
//dc.SetPen(*wxGREEN_PEN);

View file

@ -748,7 +748,7 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
if (field && field->undo_bitmap())
//if (field)
// BBS: new layout
draw_act_bmps(dc, wxPoint(h_pos, v_pos), field->undo_to_sys_bitmap()->get_bitmap(), field->undo_bitmap()->get_bitmap(), field->blink()); //OcraftyoneTODO: conversion rather than rewrite
draw_act_bmps(dc, wxPoint(h_pos, v_pos), field->undo_to_sys_bitmap()->get_bitmap(), field->undo_bitmap()->get_bitmap(), field->blink());
return;
}

View file

@ -397,9 +397,7 @@ void PresetComboBox::add_ams_filaments(std::string selected, bool alias_name)
const_cast<Preset&>(*iter).is_visible = true;
auto color = tray.opt_string("filament_colour", 0u);
auto name = tray.opt_string("tray_name", 0u);
// wxBitmap bmp(get_extruder_color_icon(color, name, 24, 16)->GetBitmapFor(m_parent)); //OcraftyoneTODO: conversion rather than updating correctly
int item_id = Append(get_preset_name(*iter), *get_extruder_color_icon(color, name, 24, 16), &m_first_ams_filament + entry.first);
//validate_selection(id->value == selected); // can not select
}
m_last_ams_filament = GetCount();
}