mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 09:02:06 +00:00
Update Plater.cpp
This commit is contained in:
@@ -1679,7 +1679,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
};
|
||||
PanelColors panel_color;
|
||||
|
||||
p->panel_printer_preset = new StaticBox(p->m_panel_printer_content);
|
||||
p->panel_printer_preset = new StaticBox(p->m_panel_printer_content, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
p->panel_printer_preset->SetCornerRadius(FromDIP(8));
|
||||
p->panel_printer_preset->SetBorderColor(panel_color.bd_normal);
|
||||
p->panel_printer_preset->SetMinSize(FromDIP(PRINTER_PANEL_SIZE));
|
||||
@@ -1718,6 +1718,8 @@ Sidebar::Sidebar(Plater *parent)
|
||||
PlaterPresetComboBox *combo_printer = new PlaterPresetComboBox(p->panel_printer_preset, Preset::TYPE_PRINTER);
|
||||
combo_printer->SetBorderWidth(0);
|
||||
p->combo_printer = combo_printer;
|
||||
p->combo_printer->SetCanFocus(false);
|
||||
p->combo_printer->DisableFocusFromKeyboard();
|
||||
// ORCA paint whole combobox on focus
|
||||
auto printer_focus_bg = [this, panel_color](bool focused){
|
||||
auto bg_color = StateColor::darkModeColorFor(focused ? panel_color.bg_focus : panel_color.bg_normal);
|
||||
@@ -1727,8 +1729,8 @@ Sidebar::Sidebar(Plater *parent)
|
||||
p->image_printer->SetBackgroundColour(bg_color);
|
||||
p->combo_printer->SetBackgroundColour(bg_color); // paints margins instead combo background
|
||||
};
|
||||
combo_printer->Bind(wxEVT_SET_FOCUS, [this, printer_focus_bg](auto& e) {printer_focus_bg(true ); e.Skip();});
|
||||
combo_printer->Bind(wxEVT_KILL_FOCUS, [this, printer_focus_bg](auto& e) {printer_focus_bg(false); e.Skip();});
|
||||
p->panel_printer_preset->Bind(wxEVT_SET_FOCUS, [this, printer_focus_bg](auto& e) {printer_focus_bg(true ); e.Skip();});
|
||||
p->panel_printer_preset->Bind(wxEVT_KILL_FOCUS, [this, printer_focus_bg](auto& e) {printer_focus_bg(false); e.Skip();});
|
||||
|
||||
/* ORCA This part moved to titlebar
|
||||
p->btn_connect_printer = new ScalableButton(p->panel_printer_preset, wxID_ANY, "monitor_signal_strong");
|
||||
|
||||
Reference in New Issue
Block a user