mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-30 14:22:07 +00:00
Merge branch 'main' into bugfox/bed-shape-orientation
This commit is contained in:
@@ -412,6 +412,7 @@ void GCodeViewer::SequentialView::Marker::render(int canvas_width, int canvas_he
|
||||
// break;
|
||||
// }
|
||||
case EViewType::VolumetricRate: {
|
||||
if (m_curr_move.type != EMoveType::Extrude) break;
|
||||
ImGui::SameLine(startx2);
|
||||
sprintf(buf, "%s%.2f", flow.c_str(), m_curr_move.volumetric_rate());
|
||||
ImGui::PushItemWidth(item_size);
|
||||
@@ -1143,8 +1144,12 @@ void GCodeViewer::refresh(const GCodeProcessorResult& gcode_result, const std::v
|
||||
m_extrusions.ranges.width.update_from(round_to_bin(curr.width));
|
||||
m_extrusions.ranges.fan_speed.update_from(curr.fan_speed);
|
||||
m_extrusions.ranges.temperature.update_from(curr.temperature);
|
||||
if (curr.extrusion_role != erCustom || is_visible(erCustom))
|
||||
m_extrusions.ranges.volumetric_rate.update_from(round_to_bin(curr.volumetric_rate()));
|
||||
if (curr.delta_extruder > 0.005 && curr.travel_dist > 0.01) {
|
||||
// Ignore very tiny extrusions from flow rate calculation, because
|
||||
// it could give very imprecise result due to rounding in gcode generation
|
||||
if (curr.extrusion_role != erCustom || is_visible(erCustom))
|
||||
m_extrusions.ranges.volumetric_rate.update_from(round_to_bin(curr.volumetric_rate()));
|
||||
}
|
||||
|
||||
if (curr.layer_duration > 0.f) {
|
||||
m_extrusions.ranges.layer_duration.update_from(curr.layer_duration);
|
||||
|
||||
@@ -174,7 +174,9 @@ void GLGizmoRotate::on_render()
|
||||
render_angle_arc(m_highlight_color, hover_radius_changed);
|
||||
}
|
||||
|
||||
render_grabber_connection(color, radius_changed);
|
||||
// ORCA dont use axis color on line because they are not on same direction with axis
|
||||
const ColorRGBA line_color = (m_hover_id != -1) ? m_drag_color : ColorRGBA(.6f, .6f ,.6f, 1.f);
|
||||
render_grabber_connection(line_color, radius_changed);
|
||||
shader->stop_using();
|
||||
}
|
||||
|
||||
|
||||
@@ -366,13 +366,13 @@ void ParamsPanel::create_layout()
|
||||
m_mode_sizer->Add( m_title_label, 0, wxALIGN_CENTER );
|
||||
m_mode_sizer->AddStretchSpacer(2);
|
||||
m_mode_sizer->Add(m_mode_region, 0, wxALIGN_CENTER);
|
||||
m_mode_sizer->AddStretchSpacer(1);
|
||||
m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing()));
|
||||
m_mode_sizer->Add(m_tips_arrow, 0, wxALIGN_CENTER);
|
||||
m_mode_sizer->AddStretchSpacer(8);
|
||||
m_mode_sizer->Add( m_title_view, 0, wxALIGN_CENTER );
|
||||
m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing()));
|
||||
m_mode_sizer->Add(m_mode_view, 0, wxALIGN_CENTER);
|
||||
m_mode_sizer->AddStretchSpacer(2);
|
||||
m_mode_sizer->AddSpacer(FromDIP(SidebarProps::ElementSpacing() * 6)); // ORCA using spacer prevents shaky mode_view when tips_arrow highlighting mode_region instead using AddStretchSpacer
|
||||
m_mode_sizer->Add(m_setting_btn, 0, wxALIGN_CENTER);
|
||||
m_mode_sizer->AddSpacer(FromDIP(SidebarProps::IconSpacing()));
|
||||
m_mode_sizer->Add(m_compare_btn, 0, wxALIGN_CENTER);
|
||||
|
||||
@@ -136,9 +136,26 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
|
||||
|
||||
m_optgroup->append_single_option_line("host_type");
|
||||
|
||||
auto create_sizer_with_btn = [](wxWindow* parent, ScalableButton** btn, const std::string& icon_name, const wxString& label) {
|
||||
*btn = new ScalableButton(parent, wxID_ANY, icon_name, label, wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT);
|
||||
(*btn)->SetFont(wxGetApp().normal_font());
|
||||
auto create_sizer_with_btn = [](wxWindow* parent, Button** btn, const std::string& icon_name, const wxString& label) {
|
||||
*btn = new Button(parent, label, ""/*icon_name*/, 0, parent->FromDIP(16));
|
||||
(*btn)->SetFont(Label::Body_14);
|
||||
(*btn)->SetMinSize(wxSize(parent->FromDIP(120), parent->FromDIP(26)));
|
||||
(*btn)->SetSize(wxSize(parent->FromDIP(120), parent->FromDIP(26)));
|
||||
(*btn)->SetCornerRadius(parent->FromDIP(4));
|
||||
StateColor clr_bg = StateColor(
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed),
|
||||
std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled)
|
||||
);
|
||||
(*btn)->SetBackgroundColor(clr_bg);
|
||||
(*btn)->SetBorderColor(clr_bg);
|
||||
(*btn)->SetTextColor(StateColor(
|
||||
std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Normal)
|
||||
));
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(*btn);
|
||||
@@ -235,9 +252,8 @@ void PhysicalPrinterDialog::build_printhost_settings(ConfigOptionsGroup* m_optgr
|
||||
|
||||
auto print_host_printers = [this, create_sizer_with_btn](wxWindow* parent) {
|
||||
//add_scaled_button(parent, &m_printhost_port_browse_btn, "browse", _(L("Refresh Printers")), wxBU_LEFT | wxBU_EXACTFIT);
|
||||
auto sizer = create_sizer_with_btn(parent, &m_printhost_port_browse_btn, "monitor_signal_strong", _(L("Refresh Printers")));
|
||||
ScalableButton* btn = m_printhost_port_browse_btn;
|
||||
btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
auto sizer = create_sizer_with_btn(parent, &m_printhost_port_browse_btn, "monitor_signal_strong", _L("Refresh") + " " + dots);
|
||||
Button* btn = m_printhost_port_browse_btn;
|
||||
btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent e) { update_printers(); });
|
||||
return sizer;
|
||||
};
|
||||
@@ -712,11 +728,11 @@ void PhysicalPrinterDialog::on_dpi_changed(const wxRect& suggested_rect)
|
||||
{
|
||||
const int& em = em_unit();
|
||||
|
||||
m_printhost_browse_btn->msw_rescale();
|
||||
m_printhost_test_btn->msw_rescale();
|
||||
m_printhost_logout_btn->msw_rescale();
|
||||
m_printhost_browse_btn->Rescale();
|
||||
m_printhost_test_btn->Rescale();
|
||||
m_printhost_logout_btn->Rescale();
|
||||
if (m_printhost_cafile_browse_btn)
|
||||
m_printhost_cafile_browse_btn->msw_rescale();
|
||||
m_printhost_cafile_browse_btn->Rescale();
|
||||
|
||||
m_optgroup->msw_rescale();
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
class wxTextCtrl;
|
||||
class wxStaticText;
|
||||
class ScalableButton;
|
||||
class Button;
|
||||
class wxBoxSizer;
|
||||
|
||||
namespace Slic3r {
|
||||
@@ -28,12 +28,12 @@ class PhysicalPrinterDialog : public DPIDialog
|
||||
DynamicPrintConfig* m_config { nullptr };
|
||||
ConfigOptionsGroup* m_optgroup { nullptr };
|
||||
|
||||
ScalableButton* m_printhost_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_test_btn {nullptr};
|
||||
ScalableButton* m_printhost_logout_btn {nullptr};
|
||||
ScalableButton* m_printhost_cafile_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_client_cert_browse_btn {nullptr};
|
||||
ScalableButton* m_printhost_port_browse_btn {nullptr};
|
||||
Button* m_printhost_browse_btn {nullptr};
|
||||
Button* m_printhost_test_btn {nullptr};
|
||||
Button* m_printhost_logout_btn {nullptr};
|
||||
Button* m_printhost_cafile_browse_btn {nullptr};
|
||||
Button* m_printhost_client_cert_browse_btn {nullptr};
|
||||
Button* m_printhost_port_browse_btn {nullptr};
|
||||
|
||||
RoundedRectangle* m_input_area {nullptr};
|
||||
wxStaticText* m_valid_label {nullptr};
|
||||
|
||||
@@ -382,8 +382,8 @@ PlateSettingsDialog::PlateSettingsDialog(wxWindow* parent, const wxString& title
|
||||
auto plate_name_txt = new wxStaticText(this, wxID_ANY, _L("Plate name"));
|
||||
plate_name_txt->SetFont(Label::Body_14);
|
||||
m_ti_plate_name = new TextInput(this, wxString::FromDouble(0.0), "", "", wxDefaultPosition, wxSize(FromDIP(240),-1), wxTE_PROCESS_ENTER);
|
||||
top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT |wxALL, FromDIP(5));
|
||||
top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT |wxALL, FromDIP(5));
|
||||
top_sizer->Add(plate_name_txt, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_LEFT | wxTOP | wxBOTTOM, FromDIP(5));
|
||||
top_sizer->Add(m_ti_plate_name, 0, wxALIGN_CENTER_VERTICAL | wxALIGN_RIGHT | wxTOP | wxBOTTOM, FromDIP(5));
|
||||
|
||||
m_bed_type_choice = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(FromDIP(240), -1), 0,
|
||||
NULL, wxCB_READONLY);
|
||||
|
||||
@@ -352,7 +352,8 @@ struct Sidebar::priv
|
||||
wxPanel* m_panel_project_title;
|
||||
ScalableButton* m_filament_icon = nullptr;
|
||||
Button * m_flushing_volume_btn = nullptr;
|
||||
wxSearchCtrl* m_search_bar = nullptr;
|
||||
TextInput* m_search_item = nullptr;
|
||||
StaticBox* m_search_bar = nullptr;
|
||||
Search::SearchObjectDialog* dia = nullptr;
|
||||
|
||||
// BBS printer config
|
||||
@@ -426,7 +427,7 @@ void Sidebar::priv::on_search_update()
|
||||
{
|
||||
m_object_list->assembly_plate_object_name();
|
||||
|
||||
wxString search_text = m_search_bar->GetValue();
|
||||
wxString search_text = m_search_item->GetTextCtrl()->GetValue();
|
||||
m_object_list->GetModel()->search_object(search_text);
|
||||
dia->update_list();
|
||||
}
|
||||
@@ -439,7 +440,7 @@ void Sidebar::priv::jump_to_object(ObjectDataViewModelNode* item)
|
||||
void Sidebar::priv::can_search()
|
||||
{
|
||||
if (m_search_bar->IsShown()) {
|
||||
m_search_bar->SetFocus();
|
||||
m_search_item->SetFocus();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1092,25 +1093,45 @@ Sidebar::Sidebar(Plater *parent)
|
||||
//add project content
|
||||
p->sizer_params = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
p->m_search_bar = new wxSearchCtrl(p->scrolled, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER);
|
||||
p->m_search_bar->ShowSearchButton(true);
|
||||
p->m_search_bar->ShowCancelButton(true);
|
||||
p->m_search_bar->SetDescriptiveText(_L("Search plate, object and part."));
|
||||
// ORCA: Update search box to modern style
|
||||
p->m_search_bar = new StaticBox(p->scrolled);
|
||||
p->m_search_bar->SetCornerRadius(0);
|
||||
p->m_search_bar->SetBorderColor(wxColour("#CECECE"));
|
||||
|
||||
p->m_search_bar->Bind(wxEVT_SET_FOCUS, [this](wxFocusEvent&) {
|
||||
p->m_search_item = new TextInput(p->m_search_bar, wxEmptyString, wxEmptyString, "", wxDefaultPosition, wxDefaultSize, 0 | wxBORDER_NONE);
|
||||
p->m_search_item->SetIcon(*BitmapCache().load_svg("search", FromDIP(16), FromDIP(16))); // ORCA: Add search icon to search box
|
||||
|
||||
wxTextCtrl* text_ctrl = p->m_search_item->GetTextCtrl();
|
||||
text_ctrl->SetHint(_L("Search plate, object and part."));
|
||||
text_ctrl->SetForegroundColour(wxColour("#262E30"));
|
||||
text_ctrl->SetFont(Label::Body_13);
|
||||
text_ctrl->SetSize(wxSize(-1, FromDIP(16))); // Centers text vertically
|
||||
|
||||
text_ctrl->Bind(wxEVT_SET_FOCUS, [this](wxFocusEvent& e) {
|
||||
this->p->on_search_update();
|
||||
p->m_search_bar->SetBorderColor(wxColour("#009688"));
|
||||
wxPoint pos = this->p->m_search_bar->ClientToScreen(wxPoint(0, 0));
|
||||
pos.y += this->p->m_search_bar->GetRect().height;
|
||||
p->dia->SetPosition(pos);
|
||||
p->dia->Popup();
|
||||
});
|
||||
p->m_search_bar->Bind(wxEVT_COMMAND_TEXT_UPDATED, [this](wxCommandEvent&) {
|
||||
e.Skip(); // required to show caret
|
||||
});
|
||||
text_ctrl->Bind(wxEVT_COMMAND_TEXT_UPDATED, [this](wxCommandEvent&) {
|
||||
this->p->on_search_update();
|
||||
});
|
||||
p->m_search_bar->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& e) {
|
||||
});
|
||||
text_ctrl->Bind(wxEVT_KILL_FOCUS, [this](wxFocusEvent& e) {
|
||||
p->dia->Dismiss();
|
||||
p->m_search_bar->SetBorderColor(wxColour("#CECECE"));
|
||||
p->m_search_item->GetTextCtrl()->SetValue(""); // reset value when loose focus
|
||||
e.Skip();
|
||||
});
|
||||
});
|
||||
|
||||
auto search_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
search_sizer->Add(new wxWindow(p->m_search_bar, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(1));
|
||||
search_sizer->Add(p->m_search_item, 1, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||
p->m_search_bar->SetSizer(search_sizer);
|
||||
p->m_search_bar->Layout();
|
||||
search_sizer->Fit(p->m_search_bar);
|
||||
|
||||
p->m_object_list = new ObjectList(p->scrolled);
|
||||
|
||||
@@ -1122,7 +1143,7 @@ Sidebar::Sidebar(Plater *parent)
|
||||
// Frequently Object Settings
|
||||
p->object_settings = new ObjectSettings(p->scrolled);
|
||||
|
||||
p->dia = new Search::SearchObjectDialog(p->m_object_list, p->m_search_bar);
|
||||
p->dia = new Search::SearchObjectDialog(p->m_object_list, text_ctrl);
|
||||
#if !NEW_OBJECT_SETTING
|
||||
p->object_settings->Hide();
|
||||
p->sizer_params->Add(p->object_settings->get_sizer(), 0, wxEXPAND | wxTOP, 5 * em / 10);
|
||||
@@ -1511,6 +1532,9 @@ void Sidebar::msw_rescale()
|
||||
// BBS
|
||||
//p->object_manipulation->msw_rescale();
|
||||
p->object_settings->msw_rescale();
|
||||
p->m_search_item->Rescale();
|
||||
p->m_search_item->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(16)));
|
||||
p->m_search_bar->Layout();
|
||||
|
||||
// BBS
|
||||
#if 0
|
||||
|
||||
@@ -273,7 +273,7 @@ void Tab::create_preset_tab()
|
||||
//search input
|
||||
m_search_item = new StaticBox(m_top_panel);
|
||||
StateColor box_colour(std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
|
||||
StateColor box_border_colour(std::pair<wxColour, int>(wxColour("#DBDBDB"), StateColor::Normal)); // ORCA match border color with other input/combo boxes
|
||||
StateColor box_border_colour(std::pair<wxColour, int>(wxColour("#009688"), StateColor::Normal)); // ORCA match border color with other input/combo boxes
|
||||
|
||||
m_search_item->SetBackgroundColor(box_colour);
|
||||
m_search_item->SetBorderColor(box_border_colour);
|
||||
@@ -286,8 +286,9 @@ void Tab::create_preset_tab()
|
||||
m_search_input->SetBackgroundColour(wxColour(238, 238, 238));
|
||||
m_search_input->SetForegroundColour(wxColour(43, 52, 54));
|
||||
m_search_input->SetFont(wxGetApp().bold_font());
|
||||
|
||||
search_sizer->Add(new wxWindow(m_search_item, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(6));
|
||||
m_search_input->SetIcon(*BitmapCache().load_svg("search", FromDIP(16), FromDIP(16)));
|
||||
m_search_input->GetTextCtrl()->SetHint(_L("Search in preset") + dots);
|
||||
search_sizer->Add(new wxWindow(m_search_item, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND|wxLEFT|wxRIGHT, FromDIP(2));
|
||||
search_sizer->Add(m_search_input, 1, wxEXPAND | wxALL, FromDIP(2));
|
||||
//bbl for linux
|
||||
//search_sizer->Add(new wxWindow(m_search_input, wxID_ANY, wxDefaultPosition, wxSize(0, 0)), 0, wxEXPAND | wxLEFT, 16);
|
||||
@@ -3545,14 +3546,30 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("filament_stamping_loading_speed");
|
||||
optgroup->append_single_option_line("filament_stamping_distance");
|
||||
create_line_with_widget(optgroup.get(), "filament_ramming_parameters", "", [this](wxWindow* parent) {
|
||||
auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings"))+dots, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT);
|
||||
wxGetApp().UpdateDarkUI(ramming_dialog_btn);
|
||||
ramming_dialog_btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
ramming_dialog_btn->SetSize(ramming_dialog_btn->GetBestSize());
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(ramming_dialog_btn);
|
||||
// ORCA modernize button style
|
||||
Button* btn = new Button(parent, _(L("Set")) + " " + dots);
|
||||
btn->SetFont(Label::Body_14);
|
||||
btn->SetSize(wxSize(FromDIP(120), FromDIP(26)));
|
||||
btn->SetCornerRadius(FromDIP(4));
|
||||
StateColor clr_bg = StateColor(
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed),
|
||||
std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled)
|
||||
);
|
||||
btn->SetBackgroundColor(clr_bg);
|
||||
btn->SetBorderColor(clr_bg);
|
||||
btn->SetTextColor(StateColor(
|
||||
std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Normal)
|
||||
));
|
||||
|
||||
ramming_dialog_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& e) {
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(btn);
|
||||
|
||||
btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& e) {
|
||||
RammingDialog dlg(this,(m_config->option<ConfigOptionStrings>("filament_ramming_parameters"))->get_at(0));
|
||||
if (dlg.ShowModal() == wxID_OK) {
|
||||
load_key_value("filament_ramming_parameters", dlg.get_parameters());
|
||||
@@ -3568,7 +3585,7 @@ void TabFilament::build()
|
||||
optgroup->append_single_option_line("filament_multitool_ramming_flow");
|
||||
|
||||
page = add_options_page(L("Dependencies"), "advanced");
|
||||
optgroup = page->new_optgroup(L("Profile dependencies"));
|
||||
optgroup = page->new_optgroup(L("Profile dependencies"), "param_profile_dependencies");
|
||||
create_line_with_widget(optgroup.get(), "compatible_printers", "", [this](wxWindow* parent) {
|
||||
return compatible_widget_create(parent, m_compatible_printers);
|
||||
});
|
||||
@@ -5907,10 +5924,27 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
||||
deps.checkbox = new wxCheckBox(parent, wxID_ANY, _(L("All")));
|
||||
deps.checkbox->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
wxGetApp().UpdateDarkUI(deps.checkbox, false, true);
|
||||
deps.btn = new ScalableButton(parent, wxID_ANY, "printer", from_u8((boost::format(" %s %s") % _utf8(L("Set")) % std::string(dots.ToUTF8())).str()),
|
||||
wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true);
|
||||
deps.btn->SetFont(Slic3r::GUI::wxGetApp().normal_font());
|
||||
deps.btn->SetSize(deps.btn->GetBestSize());
|
||||
|
||||
// ORCA modernize button style
|
||||
Button* btn = new Button(parent, _(L("Set")) + " " + dots);
|
||||
btn->SetFont(Label::Body_14);
|
||||
btn->SetSize(wxSize(FromDIP(120), FromDIP(26)));
|
||||
btn->SetCornerRadius(FromDIP(4));
|
||||
StateColor clr_bg = StateColor(
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed),
|
||||
std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled)
|
||||
);
|
||||
btn->SetBackgroundColor(clr_bg);
|
||||
btn->SetBorderColor(clr_bg);
|
||||
btn->SetTextColor(StateColor(
|
||||
std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Normal)
|
||||
));
|
||||
deps.btn = btn;
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add((deps.checkbox), 0, wxALIGN_CENTER_VERTICAL);
|
||||
@@ -5994,10 +6028,25 @@ wxSizer* Tab::compatible_widget_create(wxWindow* parent, PresetDependencies &dep
|
||||
// Return a callback to create a TabPrinter widget to edit bed shape
|
||||
wxSizer* TabPrinter::create_bed_shape_widget(wxWindow* parent)
|
||||
{
|
||||
ScalableButton* btn = new ScalableButton(parent, wxID_ANY, "printer", " " + _(L("Set")) + " " + dots,
|
||||
wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true);
|
||||
btn->SetFont(wxGetApp().normal_font());
|
||||
btn->SetSize(btn->GetBestSize());
|
||||
// ORCA modernize button style
|
||||
Button* btn = new Button(parent, _(L("Set")) + " " + dots);
|
||||
btn->SetFont(Label::Body_14);
|
||||
btn->SetSize(wxSize(FromDIP(120), FromDIP(26)));
|
||||
btn->SetCornerRadius(FromDIP(4));
|
||||
StateColor clr_bg = StateColor(
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Pressed),
|
||||
std::pair(wxColour("#D4D4D4"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Normal),
|
||||
std::pair(wxColour("#DFDFDF"), (int)StateColor::Enabled)
|
||||
);
|
||||
btn->SetBackgroundColor(clr_bg);
|
||||
btn->SetBorderColor(clr_bg);
|
||||
btn->SetTextColor(StateColor(
|
||||
std::pair(wxColour("#6B6A6A"), (int)StateColor::Disabled),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Hovered),
|
||||
std::pair(wxColour("#262E30"), (int)StateColor::Normal)
|
||||
));
|
||||
|
||||
auto sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
sizer->Add(btn, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
@@ -164,7 +164,7 @@ protected:
|
||||
struct PresetDependencies {
|
||||
Preset::Type type = Preset::TYPE_INVALID;
|
||||
wxCheckBox *checkbox = nullptr;
|
||||
ScalableButton *btn = nullptr;
|
||||
Button *btn = nullptr;
|
||||
std::string key_list; // "compatible_printers"
|
||||
std::string key_condition;
|
||||
wxString dialog_title;
|
||||
|
||||
@@ -11,6 +11,10 @@ static std::map<wxColour, wxColour> gDarkColors{
|
||||
{"#FF6F00", "#D15B00"}, // rgb(255, 111, 0) Secondary color
|
||||
{"#D01B1B", "#BB2A3A"}, // rgb(208, 27, 27) ???
|
||||
{"#262E30", "#EFEFF0"}, // rgb(38, 46, 48) Button text color | Input Text Color
|
||||
{"#DFDFDF", "#3E3E45"}, // rgb(223, 223, 223) Button Background color
|
||||
{"#D4D4D4", "#4D4D54"}, // rgb(212, 212, 212) Button Background color on Hover
|
||||
{"#6B6A6A", "#909090"}, // rgb(107, 107, 106) Button Dimmed text
|
||||
{"#6B6B6A", "#B3B3B5"}, // rgb(107, 107, 106) Input box side text
|
||||
{"#2C2C2E", "#B3B3B4"}, // rgb(44, 44, 46) ???
|
||||
{"#6B6B6B", "#818183"}, // rgb(107, 107, 107) Disabled Text
|
||||
{"#ACACAC", "#65656A"}, // rgb(172, 172, 172) Disabled Text on boxes | Dimmed Elements
|
||||
@@ -28,7 +32,6 @@ static std::map<wxColour, wxColour> gDarkColors{
|
||||
{"#DBDBDB", "#4A4A51"}, // rgb(219, 219, 219) Input/Combo Box Border Color
|
||||
{"#EDFAF2", "#283232"}, // rgb(229, 240, 238) Not Used anymore // Was used for BBS Combo / Dropdown focused background color
|
||||
{"#323A3C", "#E5E5E6"}, // rgb(50, 58, 60) Text color used on search list |
|
||||
{"#6B6B6A", "#B3B3B5"}, // rgb(107, 107, 106) Button Dimmed text | Input box side text
|
||||
{"#303A3C", "#E5E5E5"}, // rgb(48, 58, 60) Object Table > Column header text color | StaticBox Border Color
|
||||
{"#FEFFFF", "#242428"}, // rgb(254, 255, 255) Side Tabbar bg |
|
||||
{"#A6A9AA", "#2D2D29"}, // rgb(166, 169, 170) Seperator color
|
||||
|
||||
Reference in New Issue
Block a user