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:
YuSanka 2021-12-02 16:11:52 +01:00
parent efbf64fdea
commit 71a9ded1c0
8 changed files with 129 additions and 5 deletions

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="paint_x5F_supports">
<path fill="#ED6B21" d="M88,38.93c-0.83,0-1.5,0.67-1.5,1.5V70.5h-5V45.14c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5V70.5h-5V49.8
c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5v20.7h-5V53.84c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5V70.5h-5V49.8
c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5v20.7h-5V45.14c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5V70.5h-5V40.43
c0-0.83-0.67-1.5-1.5-1.5s-1.5,0.67-1.5,1.5V72v10.99c0,3.59,2.92,6.51,6.51,6.51h2.98c0.67,0.01,6.51,0.24,6.51,6.5v16
c0,3.29,1.99,9.5,9.5,9.5s9.5-6.21,9.5-9.5V96c0-6.26,5.84-6.49,6.5-6.5h3c3.59,0,6.5-2.92,6.5-6.5V72V40.43
C89.5,39.6,88.83,38.93,88,38.93z M86.5,83c0,1.93-1.57,3.5-3.5,3.5h-3c-3.29,0-9.5,1.99-9.5,9.5v15.99
c-0.01,0.67-0.24,6.51-6.5,6.51s-6.49-5.84-6.5-6.5V96c0-7.51-6.21-9.5-9.5-9.5h-2.99c-1.94,0-3.51-1.57-3.51-3.51V73.5h45V83z"/>
<g>
<path fill="#808080" d="M64,48.03c-0.26,0-0.52-0.07-0.75-0.2l-48-27.69c-0.46-0.27-0.75-0.76-0.75-1.3V8c0-0.83,0.67-1.5,1.5-1.5
s1.5,0.67,1.5,1.5v9.98L64,44.8l46.5-26.83V8c0-0.83,0.67-1.5,1.5-1.5s1.5,0.67,1.5,1.5v10.84c0,0.54-0.29,1.03-0.75,1.3
l-48,27.69C64.52,47.97,64.26,48.03,64,48.03z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="128px" height="128px" viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<path fill="#808080" d="M52.87,108.38c-5.24,0-9.5-4.26-9.5-9.5s4.26-9.5,9.5-9.5s9.5,4.26,9.5,9.5S58.11,108.38,52.87,108.38z
M52.87,92.38c-3.58,0-6.5,2.92-6.5,6.5s2.92,6.5,6.5,6.5s6.5-2.92,6.5-6.5S56.46,92.38,52.87,92.38z M29.82,83.59
c-5.24,0-9.5-4.26-9.5-9.5s4.26-9.5,9.5-9.5s9.5,4.26,9.5,9.5S35.06,83.59,29.82,83.59z M29.82,67.59c-3.58,0-6.5,2.92-6.5,6.5
s2.92,6.5,6.5,6.5s6.5-2.92,6.5-6.5S33.4,67.59,29.82,67.59z M34,49.86c-5.24,0-9.5-4.26-9.5-9.5s4.26-9.5,9.5-9.5s9.5,4.26,9.5,9.5
S39.24,49.86,34,49.86z M34,33.86c-3.58,0-6.5,2.92-6.5,6.5s2.92,6.5,6.5,6.5s6.5-2.92,6.5-6.5S37.59,33.86,34,33.86z M64,35.21
c-5.24,0-9.5-4.26-9.5-9.5s4.26-9.5,9.5-9.5s9.5,4.26,9.5,9.5S69.24,35.21,64,35.21z M64,19.21c-3.58,0-6.5,2.92-6.5,6.5
s2.92,6.5,6.5,6.5s6.5-2.92,6.5-6.5S67.58,19.21,64,19.21z M96.1,52.24c-5.24,0-9.5-4.26-9.5-9.5s4.26-9.5,9.5-9.5s9.5,4.26,9.5,9.5
S101.34,52.24,96.1,52.24z M96.1,36.24c-3.58,0-6.5,2.92-6.5,6.5s2.92,6.5,6.5,6.5s6.5-2.92,6.5-6.5S99.69,36.24,96.1,36.24z
M72.54,120.87c2.6-0.39,4.78-2.06,5.81-4.46c1.06-2.47,0.77-5.29-0.8-7.52c-3.1-4.43-4.49-9.87-3.92-15.31
c0.26-2.47,0.94-4.89,2.03-7.17c0.36-0.75,0.04-1.64-0.71-2c-0.75-0.36-1.64-0.04-2,0.71c-1.23,2.6-2.01,5.34-2.3,8.15
c-0.64,6.16,0.94,12.32,4.45,17.34c0.96,1.38,1.15,3.11,0.5,4.62c-0.63,1.47-1.91,2.44-3.5,2.68c-3.29,0.49-6.66,0.68-10.01,0.57
c-28.61-0.99-51.7-24.18-52.56-52.79c-0.46-15.2,5.2-29.48,15.94-40.21S50.49,9.07,65.68,9.53c28.62,0.86,51.8,23.94,52.79,52.56
c0.11,3.25-0.06,6.51-0.52,9.69c-0.24,1.66-1.31,3.06-2.87,3.73c-1.52,0.66-3.16,0.5-4.49-0.42c-3.29-2.3-7.17-3.8-11.21-4.34
c-0.83-0.11-1.58,0.47-1.68,1.29c-0.11,0.82,0.47,1.58,1.29,1.68c3.57,0.47,6.99,1.79,9.89,3.82c2.17,1.52,4.94,1.78,7.4,0.72
c2.52-1.09,4.26-3.36,4.65-6.06c0.48-3.36,0.67-6.8,0.55-10.22c-1.04-30.19-25.5-54.55-55.7-55.45
c-16.02-0.48-31.1,5.49-42.42,16.81C12.02,34.66,6.05,49.73,6.53,65.77c0.9,30.19,25.26,54.66,55.45,55.7
c0.67,0.02,1.34,0.04,2.01,0.04C66.86,121.5,69.73,121.29,72.54,120.87z"/>
<path fill="#ED6B21" d="M115.41,105.01l-27.66-38.8c7.76-12.6-22.89-18.09-27.92-23.34c-2.48-2.6-0.44,35.31,15.58,32.26
l29.74,37.59c0.54,0.91,3.45,5.54,7.39,6.36c0.39,0.08,0.78,0.12,1.16,0.12c1.26,0,2.48-0.42,3.58-1.25
c1.36-1.02,2.14-2.41,2.27-4.01C119.87,109.95,116.14,105.79,115.41,105.01z M78.44,74.13c1.24-0.57,2.54-1.37,3.92-2.42
c1.39-1.05,2.53-2.06,3.45-3.04l6.94,9.73l-6.85,5.15L78.44,74.13z M116.56,113.69c-0.06,0.76-0.4,1.35-1.08,1.85
c-0.77,0.58-1.51,0.76-2.33,0.6c-2.38-0.49-4.75-3.78-5.46-5.01c-0.04-0.06-0.08-0.12-0.12-0.18L87.76,85.91l6.73-5.06l18.53,25.99
c0.04,0.06,0.09,0.12,0.14,0.17C114.11,107.98,116.75,111.3,116.56,113.69z"/>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

35
resources/icons/seam_.svg Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 128 128" enable-background="new 0 0 128 128" xml:space="preserve">
<g id="paint_x5F_seams_2_">
<polyline fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
120,32 64,8 8,32 8,96 64,120 "/>
<path fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="
M120,96"/>
<polyline fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" points="
8,32 64,56 64,120 "/>
<line fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="64" y1="56" x2="120" y2="32"/>
<line fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="64" y1="120" x2="120" y2="96"/>
<line fill="none" stroke="#808080" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="120" y1="96" x2="120" y2="32"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="53.69" x2="95.96" y2="50.3"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="95.96" y1="58.3" x2="103.99" y2="54.86"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="69.69" x2="95.96" y2="66.3"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="80.05" y1="81.12" x2="88.05" y2="77.69"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="71.94" y1="92.6" x2="80.05" y2="89.12"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="80.05" y1="97.12" x2="88.05" y2="93.69"/>
<line fill="none" stroke="#ED6B21" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" x1="88.05" y1="101.69" x2="96.13" y2="98.23"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="shape_x5F_gallery_x5F_2">
<path fill="#808080" d="M11,6.72c0.14,0,0.25,0.11,0.25,0.25V14c0,0.14-0.11,0.25-0.25,0.25H2c-0.14,0-0.25-0.11-0.25-0.25V6.97
c0-0.14,0.11-0.25,0.25-0.25H11 M11,5.97H2c-0.55,0-1,0.45-1,1V14c0,0.55,0.45,1,1,1h9c0.55,0,1-0.45,1-1V6.97
C12,6.42,11.55,5.97,11,5.97L11,5.97z"/>
<path fill="#808080" d="M14,2H5C4.45,2,4,2.45,4,3v1h0.75V3c0-0.14,0.11-0.25,0.25-0.25h9c0.14,0,0.25,0.11,0.25,0.25v8
c0,0.14-0.11,0.25-0.25,0.25h-0.5V12H14c0.55,0,1-0.45,1-1V3C15,2.45,14.55,2,14,2z"/>
<path fill="#808080" d="M12.5,4h-9c-0.55,0-1,0.45-1,1v0.97h0.75V5c0-0.14,0.11-0.25,0.25-0.25h9c0.14,0,0.25,0.11,0.25,0.25v7.5
c0,0.14-0.11,0.25-0.25,0.25H12v0.75h0.5c0.55,0,1-0.45,1-1V5C13.5,4.45,13.05,4,12.5,4z"/>
<path fill="#ED6B21" d="M9.07,11.7V9.3c0-0.18-0.1-0.34-0.25-0.43l-2.07-1.2c-0.15-0.09-0.35-0.09-0.5,0l-2.07,1.2
C4.02,8.96,3.93,9.13,3.93,9.3v2.39c0,0.18,0.1,0.34,0.25,0.43l2.07,1.2c0.15,0.09,0.35,0.09,0.5,0l2.07-1.2
C8.98,12.04,9.07,11.87,9.07,11.7z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 26.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="16px" height="16px" viewBox="0 0 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="sinking">
<g>
<path fill="#808080" d="M15,10.5H1c-0.28,0-0.5-0.22-0.5-0.5S0.72,9.5,1,9.5h14c0.28,0,0.5,0.22,0.5,0.5S15.28,10.5,15,10.5z"/>
</g>
<g>
<path fill="#808080" d="M14.78,5.47L5.97,1.05C5.88,1.01,5.78,1,5.69,1.03c-0.09,0.03-0.17,0.1-0.22,0.19L2.15,7.83
C2.09,7.95,2.1,8.09,2.17,8.2c0.07,0.11,0.19,0.18,0.32,0.18h11.02c0.14,0,0.27-0.08,0.33-0.21l1.1-2.19
C15.04,5.79,14.97,5.56,14.78,5.47z"/>
<path fill="#ED6B21" d="M11.82,11.8c-0.07-0.11-0.19-0.18-0.32-0.18H4.99c-0.17,0-0.32,0.12-0.36,0.29
c-0.04,0.17,0.04,0.34,0.2,0.42l5.21,2.61c0.05,0.03,0.11,0.04,0.17,0.04c0.04,0,0.08-0.01,0.12-0.02
c0.09-0.03,0.17-0.1,0.22-0.19l1.31-2.61C11.9,12.05,11.89,11.91,11.82,11.8z"/>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -1398,7 +1398,7 @@ void MainFrame::init_menubar_as_editor()
if (!input_files.IsEmpty()) if (!input_files.IsEmpty())
m_plater->sidebar().obj_list()->load_shape_object_from_gallery(input_files); 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(); windowMenu->AppendSeparator();
append_menu_item(windowMenu, wxID_ANY, _L("Print &Host Upload Queue") + "\tCtrl+J", _L("Display the Print Host Upload Queue window"), append_menu_item(windowMenu, wxID_ANY, _L("Print &Host Upload Queue") + "\tCtrl+J", _L("Display the Print Host Upload Queue window"),

View File

@ -46,10 +46,10 @@ struct InfoItemAtributes {
const std::map<InfoItemType, InfoItemAtributes> INFO_ITEMS{ const std::map<InfoItemType, InfoItemAtributes> INFO_ITEMS{
// info_item Type info_item Name info_item BitmapName // info_item Type info_item Name info_item BitmapName
{ InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports" }, }, { InfoItemType::CustomSupports, {L("Paint-on supports"), "fdm_supports_" }, },
{ InfoItemType::CustomSeam, {L("Paint-on seam"), "seam" }, }, { InfoItemType::CustomSeam, {L("Paint-on seam"), "seam_" }, },
{ InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation"}, }, { InfoItemType::MmuSegmentation, {L("Multimaterial painting"), "mmu_segmentation_"}, },
{ InfoItemType::Sinking, {L("Sinking"), "support_blocker"}, }, { InfoItemType::Sinking, {L("Sinking"), "sinking"}, },
{ InfoItemType::VariableLayerHeight, {L("Variable layer height"), "layers"}, }, { InfoItemType::VariableLayerHeight, {L("Variable layer height"), "layers"}, },
}; };
@ -1682,6 +1682,9 @@ void ObjectDataViewModel::Rescale()
m_warning_bmp = create_scaled_bitmap(WarningIcon); m_warning_bmp = create_scaled_bitmap(WarningIcon);
m_warning_manifold_bmp = create_scaled_bitmap(WarningManifoldIcon); 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; wxDataViewItemArray all_items;
GetAllChildren(wxDataViewItem(0), all_items); GetAllChildren(wxDataViewItem(0), all_items);
@ -1705,6 +1708,8 @@ void ObjectDataViewModel::Rescale()
node->m_bmp = create_scaled_bitmap(LayerRootIcon); node->m_bmp = create_scaled_bitmap(LayerRootIcon);
case itLayer: case itLayer:
node->m_bmp = create_scaled_bitmap(LayerIcon); node->m_bmp = create_scaled_bitmap(LayerIcon);
case itInfo:
node->m_bmp = m_info_bmps.at(node->m_info_item_type);
break; break;
default: break; default: break;
} }

View File

@ -236,6 +236,7 @@ void ObjectInfo::show_sizer(bool show)
void ObjectInfo::msw_rescale() void ObjectInfo::msw_rescale()
{ {
manifold_warning_icon->SetBitmap(create_scaled_bitmap(m_warning_icon_name)); 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) 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 }) 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); wxGetApp().UpdateDarkUI(win);
p->object_info->msw_rescale();
for (wxWindow* win : std::vector<wxWindow*>{ p->scrolled, p->presets_panel }) for (wxWindow* win : std::vector<wxWindow*>{ p->scrolled, p->presets_panel })
wxGetApp().UpdateAllStaticTextDarkUI(win); wxGetApp().UpdateAllStaticTextDarkUI(win);
for (wxWindow* btn : std::vector<wxWindow*>{ p->btn_reslice, p->btn_export_gcode }) for (wxWindow* btn : std::vector<wxWindow*>{ p->btn_reslice, p->btn_export_gcode })