mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 00:37:51 -06:00
init
This commit is contained in:
parent
dc1fcf7ed6
commit
d9e9fb2206
13 changed files with 475 additions and 154 deletions
|
@ -831,6 +831,7 @@ void MainFrame::show_option(bool show)
|
|||
m_print_btn->Hide();
|
||||
m_slice_option_btn->Hide();
|
||||
m_print_option_btn->Hide();
|
||||
m_goodie_bag_btn->Hide();
|
||||
Layout();
|
||||
}
|
||||
} else {
|
||||
|
@ -839,6 +840,7 @@ void MainFrame::show_option(bool show)
|
|||
m_print_btn->Show();
|
||||
m_slice_option_btn->Show();
|
||||
m_print_option_btn->Show();
|
||||
m_goodie_bag_btn->Show();
|
||||
Layout();
|
||||
}
|
||||
}
|
||||
|
@ -1354,12 +1356,18 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
m_slice_select = eSlicePlate;
|
||||
m_print_select = ePrintPlate;
|
||||
|
||||
m_goodie_bag_btn = new SideButton(this, _L("Goodiebag"), "");
|
||||
m_slice_btn = new SideButton(this, _L("Slice"), "");
|
||||
m_slice_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||
m_print_btn = new SideButton(this, _L("Print"), "");
|
||||
m_print_option_btn = new SideButton(this, "", "sidebutton_dropdown", 0, FromDIP(14));
|
||||
|
||||
update_side_button_style();
|
||||
m_goodie_bag_btn->Enable();
|
||||
m_print_option_btn->Enable();
|
||||
sizer->Add(m_goodie_bag_btn, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, FromDIP(1));
|
||||
sizer->Add(FromDIP(15), 0, 0, 0, 0);
|
||||
|
||||
m_slice_option_btn->Enable();
|
||||
m_print_option_btn->Enable();
|
||||
sizer->Add(m_slice_option_btn, 0, wxRIGHT | wxALIGN_CENTER_VERTICAL, FromDIP(1));
|
||||
|
@ -1371,6 +1379,33 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
|
||||
sizer->Layout();
|
||||
|
||||
m_goodie_bag_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
|
||||
{
|
||||
SidePopup* p = new SidePopup(this);
|
||||
SideButton* calib_pa_btn = new SideButton(p, _L("Calibrate PA"), "");
|
||||
calib_pa_btn->SetCornerRadius(0);
|
||||
//SideButton* send_file_btn = new SideButton(p, _L("send file"), "");
|
||||
//send_file_btn->SetCornerRadius(0);
|
||||
|
||||
calib_pa_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
//this->m_plater->select_view_3D("Preview");
|
||||
m_plater->update();
|
||||
wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_PA_CALIB));
|
||||
|
||||
this->m_tabpanel->SetSelection(tpPreview);
|
||||
});
|
||||
|
||||
//send_file_btn->Bind(wxEVT_BUTTON, [this, p](wxCommandEvent&) {
|
||||
// //this->m_plater->select_view_3D("Preview");
|
||||
// wxPostEvent(m_plater, SimpleEvent(EVT_GLTOOLBAR_SEND_GCODE_FILE));
|
||||
|
||||
// });
|
||||
p->append_button(calib_pa_btn);
|
||||
//p->append_button(send_file_btn);
|
||||
p->Popup(m_goodie_bag_btn);
|
||||
}
|
||||
);
|
||||
|
||||
m_slice_btn->Bind(wxEVT_BUTTON, [this](wxCommandEvent& event)
|
||||
{
|
||||
//this->m_plater->select_view_3D("Preview");
|
||||
|
@ -1556,6 +1591,7 @@ wxBoxSizer* MainFrame::create_side_tools()
|
|||
p->append_button(send_to_printer_btn);
|
||||
p->append_button(send_to_printer_all_btn);
|
||||
p->append_button(export_sliced_file_btn);
|
||||
//p->append_button(export_gcode_btn);
|
||||
p->append_button(export_all_sliced_file_btn);
|
||||
}
|
||||
|
||||
|
@ -1703,6 +1739,14 @@ void MainFrame::update_side_button_style()
|
|||
// BBS
|
||||
int em = em_unit();
|
||||
|
||||
m_goodie_bag_btn->SetLayoutStyle(1);
|
||||
m_goodie_bag_btn->SetTextLayout(SideButton::EHorizontalOrientation::HO_Center, FromDIP(15));
|
||||
m_goodie_bag_btn->SetMinSize(wxSize(-1, FromDIP(24)));
|
||||
m_goodie_bag_btn->SetCornerRadius(FromDIP(12));
|
||||
m_goodie_bag_btn->SetExtraSize(wxSize(FromDIP(38), FromDIP(10)));
|
||||
m_goodie_bag_btn->SetBottomColour(wxColour(0x3B4446));
|
||||
|
||||
m_slice_btn->SetLayoutStyle(1);
|
||||
/*m_slice_btn->SetLayoutStyle(1);
|
||||
m_slice_btn->SetTextLayout(SideButton::EHorizontalOrientation::HO_Center, FromDIP(15));
|
||||
m_slice_btn->SetMinSize(wxSize(-1, FromDIP(24)));
|
||||
|
@ -1786,6 +1830,7 @@ void MainFrame::on_dpi_changed(const wxRect& suggested_rect)
|
|||
|
||||
update_side_button_style();
|
||||
|
||||
m_goodie_bag_btn->Rescale();
|
||||
m_slice_btn->Rescale();
|
||||
m_print_btn->Rescale();
|
||||
m_slice_option_btn->Rescale();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue