mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-26 02:01:12 -06:00
ObjectList: Fixed update of the icons for InfoItems, when color mode was changed
Sidebar:ObjectInfo: Fixed update of the icon, when color mode was changed + Added new icons for "Sinking" and "ShapeGallery"
This commit is contained in:
parent
efbf64fdea
commit
71a9ded1c0
8 changed files with 129 additions and 5 deletions
|
|
@ -1398,7 +1398,7 @@ void MainFrame::init_menubar_as_editor()
|
|||
if (!input_files.IsEmpty())
|
||||
m_plater->sidebar().obj_list()->load_shape_object_from_gallery(input_files);
|
||||
}
|
||||
}, "cog", nullptr, []() {return true; }, this);
|
||||
}, "shape_gallery", nullptr, []() {return true; }, this);
|
||||
|
||||
windowMenu->AppendSeparator();
|
||||
append_menu_item(windowMenu, wxID_ANY, _L("Print &Host Upload Queue") + "\tCtrl+J", _L("Display the Print Host Upload Queue window"),
|
||||
|
|
|
|||
|
|
@ -46,10 +46,10 @@ struct InfoItemAtributes {
|
|||
|
||||
const std::map<InfoItemType, InfoItemAtributes> INFO_ITEMS{
|
||||
// info_item Type info_item Name info_item BitmapName
|
||||
{ InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports" }, },
|
||||
{ InfoItemType::CustomSeam, {L("Paint-on seam"), "seam" }, },
|
||||
{ InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation"}, },
|
||||
{ InfoItemType::Sinking, {L("Sinking"), "support_blocker"}, },
|
||||
{ InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports_" }, },
|
||||
{ InfoItemType::CustomSeam, {L("Paint-on seam"), "seam_" }, },
|
||||
{ InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation_"}, },
|
||||
{ InfoItemType::Sinking, {L("Sinking"), "sinking"}, },
|
||||
{ InfoItemType::VariableLayerHeight, {L("Variable layer height"), "layers"}, },
|
||||
};
|
||||
|
||||
|
|
@ -1682,6 +1682,9 @@ void ObjectDataViewModel::Rescale()
|
|||
m_warning_bmp = create_scaled_bitmap(WarningIcon);
|
||||
m_warning_manifold_bmp = create_scaled_bitmap(WarningManifoldIcon);
|
||||
|
||||
for (auto item : INFO_ITEMS)
|
||||
m_info_bmps[item.first] = create_scaled_bitmap(item.second.bmp_name);
|
||||
|
||||
wxDataViewItemArray all_items;
|
||||
GetAllChildren(wxDataViewItem(0), all_items);
|
||||
|
||||
|
|
@ -1705,6 +1708,8 @@ void ObjectDataViewModel::Rescale()
|
|||
node->m_bmp = create_scaled_bitmap(LayerRootIcon);
|
||||
case itLayer:
|
||||
node->m_bmp = create_scaled_bitmap(LayerIcon);
|
||||
case itInfo:
|
||||
node->m_bmp = m_info_bmps.at(node->m_info_item_type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -236,6 +236,7 @@ void ObjectInfo::show_sizer(bool show)
|
|||
void ObjectInfo::msw_rescale()
|
||||
{
|
||||
manifold_warning_icon->SetBitmap(create_scaled_bitmap(m_warning_icon_name));
|
||||
info_icon->SetBitmap(create_scaled_bitmap("info"));
|
||||
}
|
||||
|
||||
void ObjectInfo::update_warning_icon(const std::string& warning_icon_name)
|
||||
|
|
@ -1134,6 +1135,7 @@ void Sidebar::sys_color_changed()
|
|||
|
||||
for (wxWindow* win : std::vector<wxWindow*>{ this, p->sliced_info->GetStaticBox(), p->object_info->GetStaticBox(), p->btn_reslice, p->btn_export_gcode })
|
||||
wxGetApp().UpdateDarkUI(win);
|
||||
p->object_info->msw_rescale();
|
||||
for (wxWindow* win : std::vector<wxWindow*>{ p->scrolled, p->presets_panel })
|
||||
wxGetApp().UpdateAllStaticTextDarkUI(win);
|
||||
for (wxWindow* btn : std::vector<wxWindow*>{ p->btn_reslice, p->btn_export_gcode })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue