Connect: Updated information line

(SPE-2234)
This commit is contained in:
YuSanka 2024-05-21 10:48:41 +02:00
parent 906146a788
commit 74a6ae3f1d
10 changed files with 143 additions and 99 deletions

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Vrstva_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 14 14" enable-background="new 0 0 14 14" xml:space="preserve">
<g>
<circle fill="#ED6B21" cx="7" cy="7" r="4"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 401 B

View File

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="printer">
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="14" y="1" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-1.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 13.5 -2.5)" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-5.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 9.5 -6.5)" fill="#808080" width="1" height="14"/>
<rect x="7" y="7" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22 6)" fill="#808080" width="2" height="14"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#7DF028" cx="12" cy="12" r="3.5"/>
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="1" y="5" fill="#808080" width="14" height="1"/>
<rect x="1" y="1" fill="#808080" width="14" height="1"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#5CD800" cx="12" cy="12" r="4"/>
<g>
<path fill="#808080" d="M15,7.4V1h-1v5.9C14.4,7,14.7,7.2,15,7.4z"/>
<path fill="#808080" d="M6.6,13H1v2h6.4C7,14.4,6.7,13.7,6.6,13z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 813 B

View File

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="printer">
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="14" y="1" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-1.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 13.5 -2.5)" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-5.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 9.5 -6.5)" fill="#808080" width="1" height="14"/>
<rect x="7" y="7" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22 6)" fill="#808080" width="2" height="14"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#FFDC00" cx="12" cy="12" r="3.5"/>
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="1" y="5" fill="#808080" width="14" height="1"/>
<rect x="1" y="1" fill="#808080" width="14" height="1"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#2E9BFF" cx="12" cy="12" r="4"/>
<g>
<path fill="#808080" d="M15,7.4V1h-1v5.9C14.4,7,14.7,7.2,15,7.4z"/>
<path fill="#808080" d="M6.6,13H1v2h6.4C7,14.4,6.7,13.7,6.6,13z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 813 B

View File

@ -1,16 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="printer">
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="14" y="1" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-1.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 13.5 -2.5)" fill="#808080" width="1" height="14"/>
<rect x="7.5" y="-5.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 9.5 -6.5)" fill="#808080" width="1" height="14"/>
<rect x="7" y="7" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22 6)" fill="#808080" width="2" height="14"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#D30000" cx="12" cy="12" r="3.5"/>
<rect x="1" y="1" fill="#808080" width="1" height="14"/>
<rect x="1" y="5" fill="#808080" width="14" height="1"/>
<rect x="1" y="1" fill="#808080" width="14" height="1"/>
<rect x="3" y="4" fill="#ED6B21" width="4" height="4"/>
<polygon fill="#ED6B21" points="5,9 4,8 6,8 "/>
<circle fill="#FB4040" cx="12" cy="12" r="4"/>
<g>
<path fill="#808080" d="M15,7.4V1h-1v5.9C14.4,7,14.7,7.2,15,7.4z"/>
<path fill="#808080" d="M6.6,13H1v2h6.4C7,14.4,6.7,13.7,6.6,13z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 813 B

View File

@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="sla">
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#7DF028" cx="12" cy="12" r="3.5"/>
</g>
<circle fill="#5CD800" cx="12" cy="12" r="4"/>
<path fill="#ED6B21" d="M12,6.5c0.3,0,0.7,0,1,0.1V1H3v10h3.6C7,8.4,9.3,6.5,12,6.5z"/>
<path fill="#808080" d="M6.9,14H6v-2h0.5c0-0.3,0-0.7,0.1-1H3v1v2v1h4.4C7.2,14.7,7,14.4,6.9,14z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 576 B

View File

@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="sla">
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#FFDC00" cx="12" cy="12" r="3.5"/>
</g>
<circle fill="#2E9BFF" cx="12" cy="12" r="4"/>
<path fill="#ED6B21" d="M12,6.5c0.3,0,0.7,0,1,0.1V1H3v10h3.6C7,8.4,9.3,6.5,12,6.5z"/>
<path fill="#808080" d="M6.9,14H6v-2h0.5c0-0.3,0-0.7,0.1-1H3v1v2v1h4.4C7.2,14.7,7,14.4,6.9,14z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 576 B

View File

@ -1,16 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 24.0.3, 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"
<!-- Generator: Adobe Illustrator 27.2.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" 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 16 16" enable-background="new 0 0 16 16" xml:space="preserve">
<g id="sla">
<rect x="3" y="11" fill="#808080" width="1" height="4"/>
<rect x="12" y="11" fill="#808080" width="1" height="4"/>
<rect x="7.5" y="6.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 19.5 3.5)" fill="#808080" width="1" height="10"/>
<rect x="7.5" y="9.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 22.5 6.5)" fill="#808080" width="1" height="10"/>
<rect x="10.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 24.5 1.5)" fill="#808080" width="2" height="3"/>
<rect x="3.5" y="11.5" transform="matrix(-1.836970e-16 1 -1 -1.836970e-16 17.5 8.5)" fill="#808080" width="2" height="3"/>
<rect x="3" y="1" fill="#ED6B21" width="10" height="10"/>
<circle fill="#808180" cx="12" cy="12" r="4"/>
<circle fill="#D30000" cx="12" cy="12" r="3.5"/>
</g>
<circle fill="#FB3636" cx="12" cy="12" r="4"/>
<path fill="#ED6B21" d="M12,6.5c0.3,0,0.7,0,1,0.1V1H3v10h3.6C7,8.4,9.3,6.5,12,6.5z"/>
<path fill="#808080" d="M6.9,14H6v-2h0.5c0-0.3,0-0.7,0.1-1H3v1v2v1h4.4C7.2,14.7,7,14.4,6.9,14z"/>
</svg>

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 576 B

View File

@ -670,12 +670,6 @@ bool PresetComboBox::selection_is_changed_according_to_physical_printers()
// *** PlaterPresetComboBox ***
// ---------------------------------
static bool is_active_connect()
{
auto user_account = wxGetApp().plater()->get_user_account();
return user_account && user_account->is_logged();
}
PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset_type) :
PresetComboBox(parent, preset_type, wxSize(15 * wxGetApp().em_unit(), -1))
{
@ -716,8 +710,47 @@ PlaterPresetComboBox::PlaterPresetComboBox(wxWindow *parent, Preset::Type preset
switch_to_tab();
});
if (m_type == Preset::TYPE_PRINTER)
connect_info = new wxGenericStaticText(parent, wxID_ANY, /*"Info about <b>Connect</b> for printer preset"*/ "");
if (m_type == Preset::TYPE_PRINTER) {
#ifdef _WIN32
connect_info_sizer = new wxBoxSizer(wxHORIZONTAL);
connect_available_info = new wxGenericStaticText(parent, wxID_ANY, /*"Info about <b>Connect</b> for printer preset"*/ "");
connect_offline_info = new wxGenericStaticText(parent, wxID_ANY, /*"Info about <b>Connect</b> for printer preset"*/ "");
connect_printing_info = new wxGenericStaticText(parent, wxID_ANY, /*"Info about <b>Connect</b> for printer preset"*/ "");
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#5CD800")), 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(connect_available_info, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#FB3636")), 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(connect_offline_info, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#2E9BFF")), 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(connect_printing_info, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
#else
connect_info_sizer = new wxFlexGridSizer(9, 10, 0);
connect_info_sizer->SetFlexibleDirection(wxBOTH);
connect_available_info = new wxStaticText(parent, wxID_ANY, "0");
connect_offline_info = new wxStaticText(parent, wxID_ANY, "0");
connect_printing_info = new wxStaticText(parent, wxID_ANY, "0");
connect_available_info->SetFont(wxGetApp().bold_font());
connect_offline_info ->SetFont(wxGetApp().bold_font());
connect_printing_info ->SetFont(wxGetApp().bold_font());
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#5CD800")), 0, wxALIGN_CENTER_VERTICAL | wxTOP, 1);
connect_info_sizer->Add(connect_available_info, 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(new wxStaticText(parent, wxID_ANY, _L("available")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#FB3636")), 0, wxALIGN_CENTER_VERTICAL | wxTOP, 1);
connect_info_sizer->Add(connect_offline_info, 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(new wxStaticText(parent, wxID_ANY, _L("offline")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
connect_info_sizer->Add(new wxStaticBitmap(parent, wxID_ANY, *get_bmp_bundle("connect_status", 14, 14, "#2E9BFF")), 0, wxALIGN_CENTER_VERTICAL | wxTOP, 1);
connect_info_sizer->Add(connect_printing_info, 0, wxALIGN_CENTER_VERTICAL);
connect_info_sizer->Add(new wxStaticText(parent, wxID_ANY, _L("printing")), 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, 10);
#endif
}
}
PlaterPresetComboBox::~PlaterPresetComboBox()
@ -951,7 +984,16 @@ static std::string get_connect_state_suffix_for_printer(const Preset& printer_pr
return "";
}
static wxString get_connect_info_line(const Preset& printer_preset)
static bool fill_data_to_connect_info_line( const Preset& printer_preset,
#ifdef _WIN32
wxGenericStaticText* connect_available_info,
wxGenericStaticText* connect_offline_info,
wxGenericStaticText* connect_printing_info)
#else
wxStaticText* connect_available_info,
wxStaticText* connect_offline_info,
wxStaticText* connect_printing_info)
#endif
{
if (auto printer_state_map = wxGetApp().plater()->get_user_account()->get_printer_state_map();
!printer_state_map.empty()) {
@ -962,14 +1004,20 @@ static wxString get_connect_info_line(const Preset& printer_preset)
{
PrinterStatesCount states_cnt = get_printe_states_count(states);
return format_wxstr(_L("Available: %1%, Offline: %2%, Busy: %3%"),
format("<b><span color=\"green\">%1%</span></b>" , states_cnt.available_cnt),
format("<b><span color=\"red\">%1%</span></b>" , states_cnt.offline_cnt),
format("<b><span color=\"yellow\">%1%</span></b>", states_cnt.busy_cnt));
#ifdef _WIN32
connect_available_info->SetLabelMarkup(format_wxstr("%1% %2%", format("<b>%1%</b>", states_cnt.available_cnt), _L("available")));
connect_offline_info ->SetLabelMarkup(format_wxstr("%1% %2%", format("<b>%1%</b>", states_cnt.offline_cnt), _L("offline")));
connect_printing_info ->SetLabelMarkup(format_wxstr("%1% %2%", format("<b>%1%</b>", states_cnt.busy_cnt), _L("printing")));
#else
connect_available_info->SetLabel(format_wxstr("%1% ", states_cnt.available_cnt));
connect_offline_info ->SetLabel(format_wxstr("%1% ", states_cnt.offline_cnt));
connect_printing_info ->SetLabel(format_wxstr("%1% ", states_cnt.busy_cnt));
#endif
return true;
}
}
}
return " "; // to correct update of strinh height don't use empty string
return false;
}
// Only the compatible presets are shown.
@ -1047,7 +1095,7 @@ void PlaterPresetComboBox::update()
if (m_type == Preset::TYPE_PRINTER) {
bitmap_type_name = bitmap_key += get_connect_state_suffix_for_printer(preset);
if (is_selected)
connect_info->SetLabelMarkup(get_connect_info_line(preset));
connect_info_sizer->Show(fill_data_to_connect_info_line(preset, connect_available_info, connect_offline_info, connect_printing_info));
}
bool single_bar = false;
@ -1165,7 +1213,7 @@ void PlaterPresetComboBox::update()
}
}
if (is_selected_some_ph_printer)
connect_info->SetLabel(wxEmptyString);
connect_info_sizer->Show(false);
std::sort(preset_data.begin(), preset_data.end(), [](const PhysicalPrinterPresetData& a, const PhysicalPrinterPresetData& b) {
return a.lower_name < b.lower_name;
});
@ -1184,8 +1232,6 @@ void PlaterPresetComboBox::update()
validate_selection(data.selected);
}
}
connect_info->Show(is_active_connect());
}
if (m_type == Preset::TYPE_PRINTER || m_type == Preset::TYPE_FILAMENT || m_type == Preset::TYPE_SLA_MATERIAL) {
@ -1239,8 +1285,12 @@ void PlaterPresetComboBox::sys_color_changed()
{
PresetComboBox::sys_color_changed();
edit_btn->sys_color_changed();
if (connect_info)
wxGetApp().UpdateDarkUI(connect_info);
if (connect_info_sizer) {
wxGetApp().UpdateDarkUI(connect_available_info);
wxGetApp().UpdateDarkUI(connect_printing_info);
wxGetApp().UpdateDarkUI(connect_offline_info);
}
}
// ---------------------------------

View File

@ -163,7 +163,18 @@ public:
~PlaterPresetComboBox();
ScalableButton* edit_btn { nullptr };
wxGenericStaticText* connect_info { nullptr };
#ifdef _WIN32
wxBoxSizer* connect_info_sizer { nullptr };
wxGenericStaticText* connect_available_info { nullptr };
wxGenericStaticText* connect_printing_info { nullptr };
wxGenericStaticText* connect_offline_info { nullptr };
#else
wxFlexGridSizer* connect_info_sizer { nullptr };
wxStaticText* connect_available_info { nullptr };
wxStaticText* connect_printing_info { nullptr };
wxStaticText* connect_offline_info { nullptr };
#endif
void switch_to_tab();
void change_extruder_color();

View File

@ -379,9 +379,11 @@ Sidebar::Sidebar(Plater *parent)
wxBOTTOM, 1);
(void)margin_5; // supress unused capture warning
#endif // __WXGTK3__
if ((*combo)->connect_info)
sizer_presets->Add((*combo)->connect_info, 0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT | wxBOTTOM,
int(0.3 * wxGetApp().em_unit()));
if ((*combo)->connect_info_sizer) {
auto tmp_h_sizer = new wxBoxSizer(wxHORIZONTAL);
tmp_h_sizer->Add((*combo)->connect_info_sizer, 1, wxEXPAND);
sizer_presets->Add(tmp_h_sizer, 0, wxBOTTOM, int(0.3 * wxGetApp().em_unit()));
}
} else {
sizer_filaments->Add(combo_and_btn_sizer, 0, wxEXPAND |
#ifdef __WXGTK3__