diff --git a/resources/images/extruder_sync.svg b/resources/images/extruder_sync.svg
index 4e18766368..a8e8c922a6 100644
--- a/resources/images/extruder_sync.svg
+++ b/resources/images/extruder_sync.svg
@@ -1,3 +1 @@
-
+
\ No newline at end of file
diff --git a/resources/images/multi_extruder.svg b/resources/images/multi_extruder.svg
index 24bb6eed8c..91ecaeb968 100644
--- a/resources/images/multi_extruder.svg
+++ b/resources/images/multi_extruder.svg
@@ -1,10 +1 @@
-
+
\ No newline at end of file
diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp
index 4fce046162..5bb3b52350 100644
--- a/src/slic3r/GUI/OG_CustomCtrl.cpp
+++ b/src/slic3r/GUI/OG_CustomCtrl.cpp
@@ -808,7 +808,7 @@ void OG_CustomCtrl::CtrlLine::render(wxDC& dc, wxCoord h_pos, wxCoord v_pos)
wxCoord icon_pos = h_pos;
if (is_multi_extruder) {
static ScalableBitmap multi_extruder(ctrl, "multi_extruder");
- h_pos = draw_act_bmps(dc, wxPoint(h_pos, v_pos), multi_extruder.bmp(), multi_extruder.bmp(), false, 0, true).x;
+ h_pos = draw_act_bmps(dc, wxPoint(h_pos - multi_extruder.bmp().GetWidth() - ctrl->m_h_gap, v_pos), multi_extruder.bmp(), multi_extruder.bmp(), false, 0, true).x + ctrl->m_h_gap;
}
is_url_string = !suppress_hyperlinks && !og_line.label_path.empty();
// BBS
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 2622fdbc28..e68501e729 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -637,8 +637,8 @@ static void use_nozzle_row_font(ComboBox *combo)
{
// A read-only combo draws its value with the font of the TextInput it is built on, and its
// dropped list carries a font of its own.
- combo->SetFont(Label::Body_10);
- combo->GetDropDown().SetFont(Label::Body_10);
+ combo->SetFont(Label::Body_13);
+ combo->GetDropDown().SetFont(Label::Body_13);
// A row is as tall as the tags of the variant switch: a line of Body_10 text plus the 3 points of
// padding they put above and below it. TextInput::messureSize() instead sizes a combo as its
@@ -648,7 +648,7 @@ static void use_nozzle_row_font(ComboBox *combo)
// arithmetic landing on the small box however often it re-measures.
const int row_height = combo->GetTextExtent("0.4 mm").y + 2 * combo->FromDIP(3);
auto *text_ctrl = combo->GetTextCtrl();
- text_ctrl->SetFont(Label::Body_10);
+ text_ctrl->SetFont(Label::Body_13);
text_ctrl->SetInitialSize(wxSize(text_ctrl->GetBestSize().x, row_height - 8));
combo->SetMinSize(wxSize(combo->GetMinSize().x, row_height));
@@ -1442,12 +1442,12 @@ ExtruderGroup::ExtruderGroup(wxWindow * parent, int index, wxString const &title
ams_panel->SetBackgroundColour(*wxWHITE);
ams_label = new wxStaticText(ams_panel, wxID_ANY, _L("AMS"));
- ams_label->SetFont(Label::Body_14);
+ ams_label->SetFont(Label::Body_13);
ams_label->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
// AMS not installed message
ams_not_installed_msg = new wxStaticText(ams_panel, wxID_ANY, _L("Not installed"));
- ams_not_installed_msg->SetFont(Label::Body_14);
+ ams_not_installed_msg->SetFont(Label::Body_13);
ams_not_installed_msg->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#6B6B6B")));
if (index >= 0) {
@@ -1537,9 +1537,9 @@ ExtruderGroup::ExtruderGroup(wxWindow * parent, int index, wxString const &title
auto rows_sizer = new wxBoxSizer(wxHORIZONTAL);
for (wxBoxSizer *&column : row_columns) {
column = new wxBoxSizer(wxVERTICAL);
- rows_sizer->Add(column, 1, wxEXPAND);
+ rows_sizer->Add(column, 1, wxEXPAND | wxLEFT , FromDIP(5));
}
- vsizer->Add(rows_sizer, 0, wxEXPAND);
+ vsizer->Add(rows_sizer, 0, wxEXPAND | wxRIGHT, FromDIP(5));
sizer = vsizer; // the floating filament-switch icon positions itself against this card
SetSizer(vsizer);
SetNozzleRowCount(1);
@@ -1554,12 +1554,12 @@ ExtruderGroup::NozzleRow ExtruderGroup::create_nozzle_row()
const size_t row_index = rows.size();
NozzleRow row;
- row.prefix = new Label(this, Label::Body_10.Bold());
+ row.prefix = new Label(this, Label::Body_12.Bold());
row.prefix->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
row.prefix->SetLabelText(wxString::Format("T%d", int(row_index) + 1));
row.prefix->Hide();
- row.diameter_label = new Label(this, Label::Body_10);
+ row.diameter_label = new Label(this, Label::Body_12);
row.diameter_label->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636")));
row.diameter_label->Hide();
@@ -1591,7 +1591,7 @@ ExtruderGroup::NozzleRow ExtruderGroup::create_nozzle_row()
row_sizer->Add(row.diameter_label, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(5));
row_sizer->Add(row.flow, 1);
// Row-major: T1 T2 on the first line, T3 T4 on the second, and so on.
- row_columns[row_index % 2]->Add(row_sizer, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(5));
+ row_columns[row_index % 2]->Add(row_sizer, 0, wxEXPAND | wxBOTTOM, FromDIP(5));
return row;
}
@@ -1618,9 +1618,9 @@ void ExtruderGroup::SetRowDiameters(const std::vector &diameters)
{
for (size_t i = 0; i < std::min(nozzle_row_count, diameters.size()); ++i) {
// Spelled like the calibration dialogs spell a nozzle diameter, "0.4 mm".
- const wxString text = from_u8(get_diameter_string(diameters[i])) + " mm";
+ const wxString text = from_u8(get_diameter_string(diameters[i]));
rows[i].diameter_label->SetLabelText(text);
- rows[i].diameter_label->SetToolTip(text);
+ rows[i].diameter_label->SetToolTip(text + " mm");
}
update_row_widths();
Layout();
diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp
index b7f3e614b5..75fdf1ba71 100644
--- a/src/slic3r/GUI/Tab.cpp
+++ b/src/slic3r/GUI/Tab.cpp
@@ -506,6 +506,7 @@ void Tab::create_preset_tab()
if (dynamic_cast(this) || dynamic_cast(this)) {
m_extruder_switch = new MultiSwitchButton(panel);
+ m_extruder_switch->SetFont(Label::Body_11);
m_extruder_switch->SetFitToOptions();
m_extruder_switch->Bind(wxCUSTOMEVT_MULTISWITCH_SELECTION, [this](auto &evt) {
evt.Skip();
@@ -531,23 +532,32 @@ void Tab::create_preset_tab()
sync_excluder();
});
+ static ScalableBitmap multi_extruder;
+ add_scaled_bitmap(panel, multi_extruder, "multi_extruder");
+ auto icon = new wxStaticBitmap(panel, wxID_ANY, multi_extruder.bmp());
+ icon->SetToolTip(_L("Parameters with this icon can be configurable per nozzle."));
+
auto sync_box_sizer = new wxBoxSizer(wxHORIZONTAL);
sync_box_sizer->Add(m_extruder_sync, 1, wxEXPAND);
m_extruder_sync_box->SetSizer(sync_box_sizer);
m_variant_sizer = new wxBoxSizer(wxHORIZONTAL);
auto right_sizer = new wxBoxSizer(wxHORIZONTAL);
+ auto left_sizer = new wxBoxSizer(wxHORIZONTAL);
+ m_variant_sizer->Add(left_sizer, 0, wxALIGN_CENTER);
m_variant_sizer->AddStretchSpacer(1);
// Orca: proportion 1 lets a narrow row squeeze the switch, which then scrolls its buttons.
m_variant_sizer->Add(m_extruder_switch, 1, wxALIGN_CENTER, 0);
- m_variant_sizer->Add(right_sizer, 1, wxALIGN_CENTER);
- right_sizer->AddStretchSpacer(1);
+ m_variant_sizer->AddStretchSpacer(1);
+ m_variant_sizer->Add(right_sizer, 0, wxALIGN_CENTER);
+ left_sizer->Add(icon , 0, wxALIGN_CENTER | wxLEFT , m_em_unit);
right_sizer->Add(m_extruder_sync_box, 0, wxALIGN_CENTER | wxRIGHT, m_em_unit);
m_main_sizer->Add(m_variant_sizer, 0, wxEXPAND | wxTOP, m_em_unit);
} else if (dynamic_cast(this)) {
m_variant_combo = new MultiSwitchButton(panel);
+ m_variant_combo->SetFont(Label::Body_11);
m_variant_combo->Bind(wxCUSTOMEVT_MULTISWITCH_SELECTION, [this](auto &evt) {
evt.Skip();
switch_excluder(evt.GetInt());
@@ -559,11 +569,17 @@ void Tab::create_preset_tab()
m_page_view->GetParent()->Layout();
});
+ static ScalableBitmap multi_extruder;
+ add_scaled_bitmap(panel, multi_extruder, "multi_extruder");
+ auto icon = new wxStaticBitmap(panel, wxID_ANY, multi_extruder.bmp());
+ icon->SetToolTip(_L("Parameters with this icon can be configurable per nozzle."));
+
wxBoxSizer *combo_sizer = new wxBoxSizer(wxHORIZONTAL);
combo_sizer->Add(m_variant_combo, 1, wxEXPAND);
wxBoxSizer *top_sizer = new wxBoxSizer(wxHORIZONTAL);
- top_sizer->Add(combo_sizer, 1, wxEXPAND | wxLEFT, m_em_unit);
+ top_sizer->Add(icon , 0, wxALIGN_CENTER);
+ top_sizer->Add(combo_sizer, 1, wxEXPAND | wxLEFT, FromDIP(2));
m_variant_sizer = new wxBoxSizer(wxVERTICAL);
m_variant_sizer->Add(top_sizer, 0, wxLEFT, m_em_unit);
m_main_sizer->Add(m_variant_sizer, 0, wxEXPAND | wxTOP, m_em_unit);
@@ -762,7 +778,7 @@ wxString Tab::translate_category(const wxString& title, Preset::Type preset_type
if (title == "Extruder 1") return _("Left Extruder");
if (title == "Extruder 2") return _("Right Extruder");
}
- return _("Extruder") + title.SubString(8, title.Last());
+ return _("T") + title.SubString(9, title.Last()); // ORCA use T1,T2... instead "Extruder 1" .. to make printer settings usable for toolchangers
}
return _(title);
}
@@ -1172,43 +1188,30 @@ void Tab::update_extruder_switch_colors()
}
auto options = generate_extruder_options();
- auto extruders = m_preset_bundle->printers.get_edited_preset().config.option("extruder_type");
- for (size_t switch_index = 0; switch_index < options.size(); ++switch_index) {
- int selection = m_extruder_switch ? m_extruder_switch->GetSelection() : (m_variant_combo ? m_variant_combo->GetSelection() : 0);
- if (switch_index == selection) continue;
-
- bool sys_extruder = true;
- bool modified_extruder = false;
- std::vector pages_to_check;
-
- if (m_active_page) {
- if (m_active_page->title() == "Speed" || m_active_page->title() == "Motion ability" || m_active_page->title() == "Filament" ||
- m_active_page->title() == "Setting Overrides" || m_active_page->title() == "Multimaterial") {
- for (auto page_ptr : m_pages) {
- if (page_ptr.get() == m_active_page) {
- pages_to_check.push_back(page_ptr);
- break;
- }
+ std::vector pages_to_check;
+ if (m_active_page) {
+ const wxString t = m_active_page->title();
+ if (t == "Speed" || t == "Motion ability" || t == "Filament" ||
+ t == "Setting Overrides" || t == "Multimaterial") {
+ for (auto &p : m_pages){
+ if (p.get() == m_active_page) {
+ pages_to_check.push_back(p);
+ break;
}
}
}
- if (pages_to_check.empty()) {
- continue;
- }
- check_extruder_options_status(switch_index, sys_extruder, modified_extruder, pages_to_check);
+ }
- StateColor default_color(std::make_pair(0x6B6B6B, (int) StateColor::NotChecked), std::make_pair(0xFFFFFE, (int) StateColor::Normal));
- StateColor color = modified_extruder ? StateColor(m_modified_label_clr) : default_color;
+ for (size_t switch_index = 0; switch_index < options.size(); ++switch_index) {
+ bool sys_extruder = true;
+ bool modified_extruder = false;
+ if (!pages_to_check.empty())
+ check_extruder_options_status((int) switch_index, sys_extruder, modified_extruder, pages_to_check);
+ // no matching page: clear the flag so the tag doesn't keep a stale color
- if (m_extruder_switch)
- m_extruder_switch->SetButtonTextColor(switch_index, color);
- if (m_variant_combo) {
- Button *btn = m_variant_combo->GetButton(switch_index);
- if (btn) {
- m_variant_combo->SetButtonTextColor(switch_index, color);
- }
- }
+ if (m_extruder_switch) m_extruder_switch->SetModified(switch_index, modified_extruder);
+ if (m_variant_combo) m_variant_combo->SetModified(switch_index, modified_extruder);
}
}
@@ -8182,6 +8185,9 @@ void Tab::update_extruder_variants(int extruder_id, bool reload)
if (extruder_nums >= 2 && m_preset_bundle->support_different_extruders()) {
auto options = generate_extruder_options();
m_extruder_switch->SetOptions(options);
+ int item_n = options.empty() ? 0 : options.size();
+ int h_pad = item_n > 6 ? 6 : (item_n > 4 ? 8 : (item_n > 2 ? 10 : 16));
+ m_extruder_switch->SetButtonPadding(FromDIP(wxSize(h_pad,3)));
int selection_index;
if (extruder_id >= 0) {
@@ -8208,6 +8214,9 @@ void Tab::update_extruder_variants(int extruder_id, bool reload)
const int selection = m_variant_combo->GetSelection();
auto options = generate_extruder_options();
m_variant_combo->SetOptions(options);
+ int item_n = options.empty() ? 0 : options.size();
+ int h_pad = item_n > 6 ? 6 : (item_n > 4 ? 8 : (item_n > 2 ? 10 : 16));
+ m_variant_combo->SetButtonPadding(FromDIP(wxSize(h_pad,3)));
if (!options.empty())
m_variant_combo->SetSelection(selection < 0 || selection >= (int) options.size() ? 0 : selection);
@@ -8285,7 +8294,7 @@ std::vector Tab::generate_extruder_options()
nozzle = "";
}
}
- options.push_back(wxString::Format(_L("%s: %s"), _L(drive), short_nozzle_volume_name(nozzle)));
+ options.push_back(wxString::Format(_L("%s %s"), _L(drive), short_nozzle_volume_name(nozzle)));
}
return options;
}
@@ -8310,10 +8319,10 @@ std::vector Tab::generate_extruder_options()
NozzleVolumeType volume_type = NozzleVolumeType(nozzle_volumes->values[i]);
if (volume_type == NozzleVolumeType::nvtHybrid) {
- options.push_back(wxString::Format(_L("%s: %s"), extruder_name, short_nozzle_volume_name(get_nozzle_volume_type_string(NozzleVolumeType::nvtStandard))));
- options.push_back(wxString::Format(_L("%s: %s"), extruder_name, short_nozzle_volume_name(get_nozzle_volume_type_string(NozzleVolumeType::nvtHighFlow))));
+ options.push_back(wxString::Format(_L("%s %s"), extruder_name, short_nozzle_volume_name(get_nozzle_volume_type_string(NozzleVolumeType::nvtStandard))));
+ options.push_back(wxString::Format(_L("%s %s"), extruder_name, short_nozzle_volume_name(get_nozzle_volume_type_string(NozzleVolumeType::nvtHighFlow))));
} else {
- options.push_back(wxString::Format(_L("%s: %s"), extruder_name,
+ options.push_back(wxString::Format(_L("%s %s"), extruder_name,
short_nozzle_volume_name(get_nozzle_volume_type_string(volume_type))));
}
}
diff --git a/src/slic3r/GUI/Widgets/StateColor.cpp b/src/slic3r/GUI/Widgets/StateColor.cpp
index 2a9d91f59a..6c2ee4fd0b 100644
--- a/src/slic3r/GUI/Widgets/StateColor.cpp
+++ b/src/slic3r/GUI/Widgets/StateColor.cpp
@@ -43,7 +43,7 @@ static std::map gDarkColors{
{"#2B3436", "#808080"}, // rgb(43, 52, 54) Not Used anymore // Leftover from BBS. Was used as main fill color of icons
{"#ABABAB", "#ABABAB"},
{"#D9D9D9", "#27272A"}, // rgb(217, 217, 217) Sidebar > Toggle button track color
- {"#FFFEFE", "#D9D9D9"}, // rgb(255, 254, 254) Sidebar > Toggle button thumb color
+ {"#FFFEFE", "#D8D9D9"}, // rgb(255, 254, 254) Sidebar > Toggle button thumb color
{"#EBF9F0", "#293F34"},
//{"#F0F0F0", "#4C4C54"},
// ORCA
diff --git a/src/slic3r/GUI/Widgets/SwitchButton.cpp b/src/slic3r/GUI/Widgets/SwitchButton.cpp
index f9fa3405d3..58f87e2bf2 100644
--- a/src/slic3r/GUI/Widgets/SwitchButton.cpp
+++ b/src/slic3r/GUI/Widgets/SwitchButton.cpp
@@ -616,11 +616,17 @@ bool SwitchBoard::Enable(bool enable /* = true */)
MultiSwitchButton::MultiSwitchButton(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style)
: StaticBox(parent, id, pos, size, style)
, m_bg_color(StateColor(
- std::make_pair(0xE8E8E8, (int) StateColor::NotChecked),
+ std::make_pair(0xD9D9D9, (int) StateColor::NotChecked),
std::make_pair(0x009688, (int) StateColor::Normal)))
, m_text_color(StateColor(
std::make_pair(0x6B6B6B, (int) StateColor::NotChecked),
std::make_pair(0xFFFFFE, (int) StateColor::Normal)))
+ , m_br_color_modified(StateColor(
+ std::make_pair(0xD9D9D9, (int) StateColor::NotChecked),
+ std::make_pair(0xF1754F, (int) StateColor::Normal)))
+ , m_fg_color_modified(StateColor(
+ std::make_pair(0xF1754E, (int) StateColor::NotChecked),
+ std::make_pair(0xFFFFFE, (int) StateColor::Normal)))
, m_button_radius(10.0)
, m_button_padding(FromDIP(wxSize(11, 3)))
{
@@ -631,6 +637,7 @@ MultiSwitchButton::MultiSwitchButton(wxWindow *parent, wxWindowID id, const wxPo
// tool), so they live in a scrolled area: the caller caps the switch at its natural width and
// this scrolls horizontally instead of clipping the last buttons.
m_scroll = new wxScrolledWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL | wxBORDER_NONE);
+ //m_scroll->SetBackgroundColour(wxColour("#D9D9D9"));
m_scroll->SetBackgroundColour(GetBackgroundColour());
// The buttons are a single row, so only the horizontal bar may ever appear: a vertical one would
// eat into the row's height.
@@ -738,15 +745,17 @@ void MultiSwitchButton::scroll_option_into_view(Button *btn)
int MultiSwitchButton::AppendOption(const wxString &option, void *clientData)
{
Button *btn = new Button();
- btn->Create(m_scroll, option, "", wxBORDER_NONE);
+ btn->Create(m_scroll, option);
btn->SetFont(GetFont());
btn->SetBackgroundColor(m_bg_color);
+ btn->SetBorderColor(m_bg_color);
btn->SetTextColor(m_text_color);
btn->SetCornerRadius(m_button_radius);
btn->SetPaddingSize(m_button_padding);
btn->SetClientData(clientData);
btns.push_back(btn);
+ btns_modified.push_back(false);
sizer->Add(btn, 1, wxEXPAND | wxALIGN_CENTER_VERTICAL);
return int(btns.size()) - 1;
@@ -771,6 +780,7 @@ void MultiSwitchButton::DeleteAllOptions()
btn->Destroy();
}
btns.clear();
+ btns_modified.clear();
if (sizer)
sizer->Clear();
}
@@ -832,8 +842,8 @@ void MultiSwitchButton::update_button_styles()
{
for (int i = 0; i < (int) btns.size(); ++i) {
btns[i]->SetValue(i == sel);
- btns[i]->SetBackgroundColor(m_bg_color);
- btns[i]->SetTextColor(m_text_color);
+ btns[i]->SetBorderColor(btns_modified[i] ? m_br_color_modified : m_bg_color );
+ btns[i]->SetTextColor( btns_modified[i] ? m_fg_color_modified : m_text_color);
btns[i]->Refresh();
}
}
@@ -870,6 +880,13 @@ void MultiSwitchButton::SetButtonPadding(const wxSize &padding)
Refresh();
}
+void MultiSwitchButton::SetModified(int index, bool modified){
+ if(index < 0 || index >= btns_modified.size())
+ return;
+ btns_modified[index] = modified;
+ update_button_styles();
+}
+
void MultiSwitchButton::Rescale()
{
for (auto *btn : btns)
diff --git a/src/slic3r/GUI/Widgets/SwitchButton.hpp b/src/slic3r/GUI/Widgets/SwitchButton.hpp
index decff25919..33b1734730 100644
--- a/src/slic3r/GUI/Widgets/SwitchButton.hpp
+++ b/src/slic3r/GUI/Widgets/SwitchButton.hpp
@@ -162,6 +162,7 @@ public:
btns[index]->SetTextColor(color);
btns[index]->Refresh();
}
+ void SetModified(int index, bool modified);
void SetButtonCornerRadius(double radius);
void SetButtonPadding(const wxSize &padding);
@@ -186,6 +187,7 @@ private:
void on_size(wxSizeEvent &evt);
std::vector