mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-27 10:51:22 +00:00
UI fixes & improvements (#14186)
* titlebar menus * sidebar separators * Update BonjourDialog.cpp * Update StepMeshDialog.cpp * Z contouring icon * Update AmsMappingPopup.cpp * Update AmsMappingPopup.cpp * sync ams dialog * Update calib_dlg.cpp * sync popups * Update AmsMappingPopup.cpp * operation section on gizmos * Update PresetComboBoxes.cpp * Update GCodeViewer.cpp * Update GCodeViewer.cpp * Update AboutDialog.cpp * disable realistic view option on gcode preview * Update Preferences.cpp * fix nozzle text clipping on linux
This commit is contained in:
@@ -324,10 +324,12 @@ AboutDialog::AboutDialog()
|
||||
m_html->SetFonts(font.GetFaceName(), font.GetFaceName(), size);
|
||||
m_html->SetMinSize(wxSize(FromDIP(-1), FromDIP(16)));
|
||||
m_html->SetBorders(2);
|
||||
wxColour bgr_clr = GetBackgroundColour();
|
||||
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
|
||||
const auto text = from_u8(
|
||||
(boost::format(
|
||||
"<html>"
|
||||
"<body>"
|
||||
"<body bgcolor= \"" + bgr_clr_str + "\" >"
|
||||
"<p style=\"text-align:left\"><a style=\"color:#009789\" href=\"https://www.orcaslicer.com\">https://www.orcaslicer.com</ a></p>"
|
||||
"</body>"
|
||||
"</html>")
|
||||
|
||||
@@ -569,7 +569,7 @@ void MaterialSyncItem::doRender(wxDC &dc)
|
||||
dc.DrawRoundedRectangle(1, 1, MATERIAL_ITEM_SIZE.x - 1, MATERIAL_ITEM_SIZE.y - 1, 5);
|
||||
|
||||
if (m_selected) {
|
||||
dc.SetPen(wxColour(0x00, 0xAE, 0x42));
|
||||
dc.SetPen(wxColour("#009688")); // ORCA selected item border color
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(1, 1, MATERIAL_ITEM_SIZE.x - 1, MATERIAL_ITEM_SIZE.y - 1, 5);
|
||||
}
|
||||
@@ -580,7 +580,7 @@ void MaterialSyncItem::doRender(wxDC &dc)
|
||||
dc.DrawRoundedRectangle(0, 0, MATERIAL_ITEM_SIZE.x, MATERIAL_ITEM_SIZE.y, 5);
|
||||
|
||||
if (m_selected) {
|
||||
dc.SetPen(wxPen(wxColour(0x00, 0xAE, 0x42), FromDIP(2)));
|
||||
dc.SetPen(wxPen(wxColour("#009688"), FromDIP(2))); // ORCA selected item border color
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(FromDIP(1), FromDIP(1), MATERIAL_ITEM_SIZE.x - FromDIP(1), MATERIAL_ITEM_SIZE.y - FromDIP(1), 5);
|
||||
}
|
||||
@@ -813,7 +813,7 @@ void AmsMapingPopup::msw_rescale()
|
||||
m_split_left_line->SetMaxSize(wxSize(-1, 1));
|
||||
sizer_split_ams->Add(0, 0, 0, wxEXPAND, 0);
|
||||
sizer_split_ams->Add(ams_title_text, 0, wxALIGN_CENTER, 0);
|
||||
sizer_split_ams->Add(m_split_left_line, 1, wxEXPAND, 0);
|
||||
sizer_split_ams->Add(m_split_left_line, 1, wxALIGN_CENTER, 0); // ORCA align line vertically
|
||||
return sizer_split_ams;
|
||||
}
|
||||
|
||||
@@ -1420,7 +1420,7 @@ bool AmsMapingPopup::ProcessLeftDown(wxMouseEvent &event)
|
||||
void AmsMapingPopup::paintEvent(wxPaintEvent &evt)
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(wxColour(0xAC, 0xAC, 0xAC));
|
||||
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#009688")),FromDIP(2))); // ORCA use colorful border for separation
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
||||
}
|
||||
@@ -2281,7 +2281,7 @@ AmsRMGroup* AmsReplaceMaterialDialog::create_backup_group(wxString gname, std::m
|
||||
void AmsReplaceMaterialDialog::paintEvent(wxPaintEvent& evt)
|
||||
{
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(wxColour(0xAC, 0xAC, 0xAC));
|
||||
dc.SetPen(StateColor::darkModeColorFor(wxColour("#DBDBDB"))); // ORCA fix popup border color for dark mode
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,19 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
||||
// SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
|
||||
SetTransparent(m_init_transparent);
|
||||
SetBackgroundColour(wxColour(23, 25, 22, 128));
|
||||
|
||||
// ORCA add border
|
||||
Bind(wxEVT_PAINT, [this](wxPaintEvent& evt) {
|
||||
wxPaintDC dc(this);
|
||||
dc.SetPen(wxPen(StateColor::darkModeColorFor(wxColour("#009688")), FromDIP(2)));
|
||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
||||
});
|
||||
|
||||
int window_padding = 15;
|
||||
auto imgsize = 32;
|
||||
auto imgright = 10;
|
||||
|
||||
//Adaptive Frame Width
|
||||
wxClientDC dc(parent);
|
||||
wxSize msg_sz = dc.GetMultiLineTextExtent(ok_text);
|
||||
@@ -44,21 +57,16 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
||||
|
||||
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
auto image_sizer = new wxBoxSizer(wxVERTICAL);
|
||||
auto imgsize = FromDIP(25);
|
||||
auto completedimg = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("completed", this, 25), wxDefaultPosition, wxSize(imgsize, imgsize), 0);
|
||||
image_sizer->Add(completedimg, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, FromDIP(0));
|
||||
image_sizer->AddStretchSpacer();
|
||||
text_sizer->Add(image_sizer);
|
||||
text_sizer->AddSpacer(FromDIP(5));
|
||||
|
||||
auto completedimg = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("completed", this, imgsize), wxDefaultPosition, FromDIP(wxSize(imgsize, imgsize)), 0);
|
||||
|
||||
text_sizer->Add(completedimg, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(imgright));
|
||||
m_finish_text = new Label(this, win_text, LB_AUTO_WRAP);
|
||||
m_finish_text->SetMinSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
m_finish_text->SetMaxSize(wxSize(FromDIP(win_width - 64), -1));
|
||||
m_finish_text->SetMinSize(wxSize(FromDIP(win_width - (window_padding * 2 + imgright + imgsize)), -1));
|
||||
m_finish_text->SetMaxSize(wxSize(FromDIP(win_width - (window_padding * 2 + imgright + imgsize)), -1));
|
||||
m_finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
|
||||
text_sizer->Add(m_finish_text, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxALL, 0);
|
||||
text_sizer->AddSpacer(FromDIP(20));
|
||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(15));
|
||||
text_sizer->Add(m_finish_text, 0, wxALIGN_CENTER_VERTICAL);
|
||||
m_sizer_main->Add(text_sizer, 0, wxALL, FromDIP(15));
|
||||
|
||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||
@@ -66,22 +74,18 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
||||
bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT);*/
|
||||
bSizer_button->AddStretchSpacer(1);
|
||||
m_button_ok = new Button(this, ok_text);
|
||||
m_button_ok->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
|
||||
m_button_ok->SetSize(wxSize(FromDIP(60), FromDIP(30)));
|
||||
m_button_ok->SetMinSize(wxSize(FromDIP(90), FromDIP(30)));
|
||||
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
|
||||
m_button_ok->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
|
||||
|
||||
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_ok(); });
|
||||
|
||||
m_button_cancel = new Button(this, cancel_text);
|
||||
m_button_cancel->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
||||
m_button_cancel->SetSize(wxSize(FromDIP(65), FromDIP(30)));
|
||||
m_button_cancel->SetMinSize(wxSize(FromDIP(65), FromDIP(30)));
|
||||
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
|
||||
m_button_cancel->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
|
||||
|
||||
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_cancel(); });
|
||||
|
||||
m_sizer_main->Add(bSizer_button, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(20));
|
||||
m_sizer_main->Add(bSizer_button, 1, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(window_padding));
|
||||
|
||||
Bind(wxEVT_CLOSE_WINDOW, [this](auto &e) {
|
||||
on_hide();
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <boost/nowide/convert.hpp>
|
||||
|
||||
#include <wx/sizer.h>
|
||||
#include <wx/button.h>
|
||||
#include <wx/listctrl.h>
|
||||
#include <wx/stattext.h>
|
||||
#include <wx/timer.h>
|
||||
@@ -20,6 +19,8 @@
|
||||
#include "slic3r/GUI/format.hpp"
|
||||
#include "slic3r/Utils/Bonjour.hpp"
|
||||
|
||||
#include "slic3r/GUI/Widgets/DialogButtons.hpp"
|
||||
|
||||
namespace Slic3r {
|
||||
|
||||
|
||||
@@ -63,30 +64,30 @@ BonjourDialog::BonjourDialog(wxWindow *parent, Slic3r::PrinterTechnology tech)
|
||||
, timer_state(0)
|
||||
, tech(tech)
|
||||
{
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
|
||||
const int em = GUI::wxGetApp().em_unit();
|
||||
list->SetMinSize(wxSize(80 * em, 30 * em));
|
||||
|
||||
wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
label->SetFont(Label::Body_14);
|
||||
vsizer->Add(label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
|
||||
|
||||
list->SetSingleStyle(wxLC_SINGLE_SEL);
|
||||
list->SetSingleStyle(wxLC_SORT_DESCENDING);
|
||||
list->AppendColumn(_(L("Address")), wxLIST_FORMAT_LEFT, 5 * em);
|
||||
list->AppendColumn(_(L("Address")), wxLIST_FORMAT_LEFT, 20 * em);
|
||||
list->AppendColumn(_(L("Hostname")), wxLIST_FORMAT_LEFT, 10 * em);
|
||||
list->AppendColumn(_(L("Service name")), wxLIST_FORMAT_LEFT, 20 * em);
|
||||
if (tech == ptFFF) {
|
||||
list->AppendColumn(_(L("OctoPrint version")), wxLIST_FORMAT_LEFT, 5 * em);
|
||||
list->AppendColumn(_(L("OctoPrint version")), wxLIST_FORMAT_LEFT, 15 * em);
|
||||
}
|
||||
|
||||
vsizer->Add(list, 1, wxEXPAND | wxALL, em);
|
||||
|
||||
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
button_sizer->Add(new wxButton(this, wxID_OK, _L("OK")), 0, wxALL, em);
|
||||
button_sizer->Add(new wxButton(this, wxID_CANCEL, _L("Cancel")), 0, wxALL, em);
|
||||
// ^ Note: The Ok/Cancel labels are translated by wxWidgets
|
||||
auto dlg_btns = new GUI::DialogButtons(this, {"OK", "Cancel"});
|
||||
|
||||
vsizer->Add(button_sizer, 0, wxALIGN_CENTER);
|
||||
vsizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
SetSizerAndFit(vsizer);
|
||||
|
||||
Bind(EVT_BONJOUR_REPLY, &BonjourDialog::on_reply, this);
|
||||
@@ -241,12 +242,15 @@ IPListDialog::IPListDialog(wxWindow* parent, const wxString& hostname, const std
|
||||
, m_list(new wxListView(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxSIMPLE_BORDER))
|
||||
, m_selected_index (selected_index)
|
||||
{
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
|
||||
const int em = GUI::wxGetApp().em_unit();
|
||||
m_list->SetMinSize(wxSize(40 * em, 30 * em));
|
||||
|
||||
wxBoxSizer* vsizer = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
auto* label = new wxStaticText(this, wxID_ANY, GUI::format_wxstr(_L("There are several IP addresses resolving to hostname %1%.\nPlease select one that should be used."), hostname));
|
||||
label->SetFont(Label::Body_14);
|
||||
vsizer->Add(label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
|
||||
|
||||
m_list->SetSingleStyle(wxLC_SINGLE_SEL);
|
||||
@@ -259,11 +263,9 @@ IPListDialog::IPListDialog(wxWindow* parent, const wxString& hostname, const std
|
||||
|
||||
vsizer->Add(m_list, 1, wxEXPAND | wxALL, em);
|
||||
|
||||
wxBoxSizer* button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
button_sizer->Add(new wxButton(this, wxID_OK, _L("OK")), 0, wxALL, em);
|
||||
button_sizer->Add(new wxButton(this, wxID_CANCEL, _L("Cancel")), 0, wxALL, em);
|
||||
auto dlg_btns = new GUI::DialogButtons(this, {"OK", "Cancel"});
|
||||
|
||||
vsizer->Add(button_sizer, 0, wxALIGN_CENTER);
|
||||
vsizer->Add(dlg_btns, 0, wxEXPAND);
|
||||
SetSizerAndFit(vsizer);
|
||||
|
||||
GUI::wxGetApp().UpdateDlgDarkUI(this);
|
||||
|
||||
@@ -489,7 +489,7 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
const float main_row_h = 2.0f * text_h + item_spacing_y; // Two lines of text (position and detail) + spacing between them
|
||||
const float properties_h = static_cast<float>(properties_rows.size()) * (text_h + 2.0f * cell_pad_y) + 2.0f * cell_pad_y + 1.0f + item_spacing_y // table rows
|
||||
+ item_spacing_y + show_button_h // Spacing() + Show/Hide button row
|
||||
+ item_spacing_y + 1.0f + style.FramePadding.y; // Spacing() + Separator() + Dummy()
|
||||
+ item_spacing_y + 1.0f + style.WindowPadding.y; // Spacing() + Separator() + Dummy()
|
||||
const float folded_window_h = std::ceil(window_pad_h + main_row_h); // Height of the window when properties are hidden, with padding, rounded up for better look
|
||||
const float unfolded_window_h = std::ceil(folded_window_h + properties_h); // Height of the window when properties are shown, with padding, rounded up for better look
|
||||
const float window_h = properties_shown ? unfolded_window_h : folded_window_h; // Final window height depending on whether properties are shown or not
|
||||
@@ -615,9 +615,12 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
|
||||
ImGui::Spacing();
|
||||
ImGui::Separator();
|
||||
ImGui::Dummy({0, style.FramePadding.y});
|
||||
ImGui::Dummy({0, style.WindowPadding.y});
|
||||
}
|
||||
|
||||
float draw_area_height = ImGui::GetTextLineHeight() * 2.f + style.ItemSpacing.y;
|
||||
ImGui::Dummy({10.f, draw_area_height}); // reserve area
|
||||
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameRounding , 3.f * m_scale);
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding , ImVec2(2.f, 2.f) * m_scale);
|
||||
ImGui::PushStyleColor(ImGuiCol_Button , ImVec4(0, 0, 0, 0));
|
||||
@@ -625,6 +628,10 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
ImGui::PushStyleColor(ImGuiCol_ButtonActive , ImVec4(84 / 255.f, 84 / 255.f, 90 / 255.f, 1.f));
|
||||
|
||||
const float main_wnd_height = ImGui::GetWindowHeight();
|
||||
const float draw_start_y = main_wnd_height - draw_area_height - style.WindowPadding.y;
|
||||
|
||||
ImGui::SetCursorPos(ImVec2(style.WindowPadding.x, draw_start_y));
|
||||
|
||||
// ORCA use glyph based button for fixing button sizes changing depends on used font size on platform
|
||||
const wchar_t foldIcon = properties_shown ? ImGui::UnfoldButtonIcon : ImGui::FoldButtonIcon;
|
||||
if (imgui.glyph_button(foldIcon, ImVec2(16.f, 16.f) * m_scale)) {
|
||||
@@ -640,10 +647,7 @@ void GCodeViewer::SequentialView::Marker::render_position_window(const libvgcode
|
||||
ImGui::PopStyleColor(3);
|
||||
ImGui::PopStyleVar(2);
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
if(!properties_shown)
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - style.FramePadding.y); // aligns button with next group
|
||||
ImGui::SetCursorPos(ImVec2(style.WindowPadding.x + style.ItemSpacing.x + 24.f * m_scale, draw_start_y - 1.f * m_scale));
|
||||
|
||||
ImGui::BeginGroup(); // group contents to make information area more compact
|
||||
|
||||
|
||||
@@ -9324,7 +9324,7 @@ void GLCanvas3D::_render_canvas_toolbar()
|
||||
);
|
||||
|
||||
create_menu_item( _utf8(L("Realistic View")),
|
||||
true,
|
||||
m_canvas_type != ECanvasType::CanvasPreview, // not work on preview
|
||||
cfg->get_bool(SETTING_OPENGL_REALISTIC_MODE),
|
||||
[this, &cfg]{
|
||||
cfg->set_bool(SETTING_OPENGL_REALISTIC_MODE, !cfg->get_bool(SETTING_OPENGL_REALISTIC_MODE));
|
||||
|
||||
@@ -1951,7 +1951,7 @@ void GLGizmoEmboss::draw_model_type()
|
||||
float minimum_spacing_x = 8.0f;
|
||||
float minimum_offset_x = ImGui::GetCursorPosX() + minimum_spacing_x;
|
||||
float offset_x = std::max(m_gui_cfg->input_offset, minimum_offset_x);
|
||||
ImGui::SameLine(offset_x);
|
||||
ImGui::SameLine();
|
||||
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); // ORCA
|
||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||
|
||||
@@ -1989,7 +1989,7 @@ void GLGizmoSVG::draw_mirroring()
|
||||
|
||||
void GLGizmoSVG::draw_model_type()
|
||||
{
|
||||
ImGui::AlignTextToFramePadding();
|
||||
//ImGui::AlignTextToFramePadding();
|
||||
bool is_last_solid_part = m_volume->is_the_only_one_part();
|
||||
std::string title = _u8L("Operation");
|
||||
if (is_last_solid_part) {
|
||||
@@ -2005,6 +2005,8 @@ void GLGizmoSVG::draw_model_type()
|
||||
ModelVolumeType part = ModelVolumeType::MODEL_PART;
|
||||
ModelVolumeType type = m_volume->type();
|
||||
|
||||
ImGui::SameLine();
|
||||
|
||||
//TRN EmbossOperation
|
||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); //ORCA
|
||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||
|
||||
@@ -2809,21 +2809,6 @@ void MainFrame::init_menubar_as_editor()
|
||||
append_submenu(fileMenu, export_menu, wxID_ANY, _L("Export"), "");
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
append_menu_item(fileMenu, wxID_ANY, _L("Sync Presets"), _L("Pull and apply the latest presets from OrcaCloud"),
|
||||
[this](wxCommandEvent&) {
|
||||
if (!wxGetApp().is_user_login()) {
|
||||
MessageDialog info_dlg(this, _L("You must be logged in to sync presets from cloud."),
|
||||
_L("Sync Presets"), wxOK | wxICON_INFORMATION);
|
||||
info_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
wxGetApp().restart_sync_user_preset();
|
||||
}, "", nullptr,
|
||||
[this]() {
|
||||
return wxGetApp().is_user_login() && !wxGetApp().app_config->get_stealth_mode();
|
||||
}, this);
|
||||
|
||||
fileMenu->AppendSeparator();
|
||||
|
||||
#ifndef __APPLE__
|
||||
append_menu_item(fileMenu, wxID_EXIT, _L("Quit"), wxString::Format(_L("Quit")),
|
||||
@@ -3289,6 +3274,8 @@ void MainFrame::init_menubar_as_editor()
|
||||
},
|
||||
"", nullptr, []() { return true; }, this);
|
||||
|
||||
m_topbar->GetTopMenu()->AppendSeparator();
|
||||
|
||||
append_menu_item(
|
||||
m_topbar->GetTopMenu(), wxID_ANY, _L("Preset Bundle") + "\t", "",
|
||||
[this](wxCommandEvent &) {
|
||||
@@ -3316,6 +3303,8 @@ void MainFrame::init_menubar_as_editor()
|
||||
return wxGetApp().is_user_login() && !wxGetApp().app_config->get_stealth_mode();
|
||||
}, this);
|
||||
|
||||
m_topbar->GetTopMenu()->AppendSeparator();
|
||||
|
||||
//m_topbar->AddDropDownMenuItem(preference_item);
|
||||
//m_topbar->AddDropDownMenuItem(printer_item);
|
||||
//m_topbar->AddDropDownMenuItem(language_item);
|
||||
@@ -3425,6 +3414,25 @@ void MainFrame::init_menubar_as_editor()
|
||||
plater()->get_current_canvas3D()->force_set_focus();
|
||||
},
|
||||
"", nullptr, []() { return true; }, this);
|
||||
|
||||
append_menu_item(
|
||||
fileMenu, wxID_ANY, _L("Sync Presets"), _L("Pull and apply the latest presets from OrcaCloud"),
|
||||
[this](wxCommandEvent&) {
|
||||
if (!wxGetApp().is_user_login()) {
|
||||
MessageDialog info_dlg(this, _L("You must be logged in to sync presets from cloud."),
|
||||
_L("Sync Presets"), wxOK | wxICON_INFORMATION);
|
||||
info_dlg.ShowModal();
|
||||
return;
|
||||
}
|
||||
if (m_plater)
|
||||
m_plater->get_notification_manager()->push_notification(
|
||||
into_u8(_L("Syncing presets from cloud\u2026")));
|
||||
wxGetApp().restart_sync_user_preset();
|
||||
}, "", nullptr,
|
||||
[this]() {
|
||||
return wxGetApp().is_user_login() && !wxGetApp().app_config->get_stealth_mode();
|
||||
}, this);
|
||||
|
||||
m_menubar->Append(fileMenu, wxString::Format("&%s", _L("File")));
|
||||
if (editMenu)
|
||||
m_menubar->Append(editMenu, wxString::Format("&%s", _L("Edit")));
|
||||
|
||||
+17
-20
@@ -537,6 +537,7 @@ struct Sidebar::priv
|
||||
//wxComboBox * m_comboBox_print_preset;
|
||||
wxStaticLine * m_staticline1;
|
||||
StaticBox* m_panel_filament_title;
|
||||
wxPanel* m_panel_filament_separator;
|
||||
wxStaticText* m_staticText_filament_settings;
|
||||
wxStaticText* m_staticText_filament_count;
|
||||
ScalableButton * m_bpButton_add_filament;
|
||||
@@ -556,6 +557,7 @@ struct Sidebar::priv
|
||||
|
||||
// BBS printer config
|
||||
StaticBox* m_panel_printer_title = nullptr;
|
||||
wxPanel* m_panel_printer_separator = nullptr;
|
||||
ScalableButton* m_printer_icon = nullptr;
|
||||
ScalableButton* m_printer_connect = nullptr;
|
||||
ScalableButton* m_printer_bbl_sync = nullptr;
|
||||
@@ -1735,10 +1737,6 @@ Sidebar::Sidebar(Plater *parent)
|
||||
p->m_panel_printer_title->Layout();
|
||||
|
||||
// 1.2 Add spliters around title bar
|
||||
// add spliter 1
|
||||
//auto spliter_1 = new ::StaticLine(p->scrolled);
|
||||
//spliter_1->SetBackgroundColour("#A6A9AA");
|
||||
//scrolled_sizer->Add(spliter_1, 0, wxEXPAND);
|
||||
|
||||
// add printer title
|
||||
scrolled_sizer->Add(p->m_panel_printer_title, 0, wxEXPAND | wxALL, 0);
|
||||
@@ -1750,14 +1748,13 @@ Sidebar::Sidebar(Plater *parent)
|
||||
wxString title = _L("Printer") + wxString(!isShown ? "" : (" | " + p->combo_printer->GetValue()));
|
||||
p->m_text_printer_settings->SetLabel(title);
|
||||
p->m_panel_printer_content->Show(!isShown);
|
||||
p->m_panel_printer_separator->Show(isShown);
|
||||
m_scrolled_sizer->Layout();
|
||||
});
|
||||
|
||||
// add spliter 2
|
||||
auto spliter_2 = new ::StaticLine(p->scrolled);
|
||||
spliter_2->SetLineColour("#CECECE");
|
||||
scrolled_sizer->Add(spliter_2, 0, wxEXPAND);
|
||||
|
||||
// ORCA add bottom border for seperation wile sections folded
|
||||
p->m_panel_printer_separator = new wxPanel(p->scrolled, wxID_ANY, wxDefaultPosition, wxSize(-1, FromDIP(2))); // ORCA staticline class not works without string
|
||||
p->m_panel_printer_separator->SetBackgroundColour("#FFFFFF");
|
||||
scrolled_sizer->Add(p->m_panel_printer_separator, 0, wxEXPAND);
|
||||
|
||||
/*************************** 2. add printer content ************************/
|
||||
|
||||
@@ -1937,9 +1934,9 @@ Sidebar::Sidebar(Plater *parent)
|
||||
}
|
||||
|
||||
wxGridSizer *nozzle_dia_sizer = new wxGridSizer(3, 1, FromDIP(2), 0);
|
||||
nozzle_dia_sizer->Add(p->label_nozzle_title, 0, wxALIGN_CENTER | wxTOP, FromDIP(4));
|
||||
nozzle_dia_sizer->Add(p->combo_nozzle_dia , 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, FromDIP(2));
|
||||
nozzle_dia_sizer->Add(p->label_nozzle_type , 0, wxALIGN_CENTER);
|
||||
nozzle_dia_sizer->Add(p->label_nozzle_title, 1, wxALIGN_CENTER | wxTOP , FromDIP(2));
|
||||
nozzle_dia_sizer->Add(p->combo_nozzle_dia , 0, wxALIGN_CENTER);
|
||||
nozzle_dia_sizer->Add(p->label_nozzle_type , 1, wxALIGN_CENTER | wxBOTTOM, FromDIP(1));
|
||||
|
||||
p->panel_nozzle_dia->SetSizer(nozzle_dia_sizer);
|
||||
|
||||
@@ -2108,7 +2105,9 @@ Sidebar::Sidebar(Plater *parent)
|
||||
else if (ams_btn->IsShown()) exclude_pt = ams_btn->GetPosition().x;
|
||||
if (e.GetPosition().x > exclude_pt)
|
||||
return;
|
||||
p->m_panel_filament_content->Show(!p->m_panel_filament_content->IsShown());
|
||||
bool isShown = p->m_panel_filament_content->IsShown();
|
||||
p->m_panel_filament_content->Show(!isShown);
|
||||
p->m_panel_filament_separator->Show(isShown);
|
||||
m_scrolled_sizer->Layout();
|
||||
|
||||
CallAfter([this]{update_filaments_counter(true);}); // call after all UI processing done
|
||||
@@ -2128,13 +2127,11 @@ Sidebar::Sidebar(Plater *parent)
|
||||
|
||||
p->m_panel_filament_title->SetSizer( bSizer39 );
|
||||
p->m_panel_filament_title->Layout();
|
||||
auto spliter_1 = new ::StaticLine(p->scrolled);
|
||||
spliter_1->SetLineColour("#A6A9AA");
|
||||
scrolled_sizer->Add(spliter_1, 0, wxEXPAND);
|
||||
scrolled_sizer->Add(p->m_panel_filament_title, 0, wxEXPAND | wxALL, 0);
|
||||
auto spliter_2 = new ::StaticLine(p->scrolled);
|
||||
spliter_2->SetLineColour("#CECECE");
|
||||
scrolled_sizer->Add(spliter_2, 0, wxEXPAND);
|
||||
// ORCA add bottom border for seperation wile sections folded
|
||||
p->m_panel_filament_separator = new wxPanel(p->scrolled, wxID_ANY, wxDefaultPosition, wxSize(-1, FromDIP(2))); // ORCA staticline class not works without string
|
||||
p->m_panel_filament_separator->SetBackgroundColour("#FFFFFF");
|
||||
scrolled_sizer->Add(p->m_panel_filament_separator, 0, wxEXPAND);
|
||||
|
||||
bSizer39->AddStretchSpacer(1);
|
||||
|
||||
|
||||
@@ -797,7 +797,7 @@ wxBoxSizer *PreferencesDialog::create_item_decimal_input(wxString title, wxStrin
|
||||
input->SetToolTip(tooltip);
|
||||
input->GetTextCtrl()->SetValidator(validator);
|
||||
|
||||
m_sizer->Add(input, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, FromDIP(5));
|
||||
m_sizer->Add(input, 0, wxALIGN_CENTER_VERTICAL);
|
||||
|
||||
auto apply_value = [this, param, input, min, max, decimals]() {
|
||||
auto value = input->GetTextCtrl()->GetValue();
|
||||
|
||||
@@ -1600,6 +1600,7 @@ TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type)
|
||||
// BBS: new layout
|
||||
PresetComboBox(parent, preset_type, wxSize(20 * wxGetApp().em_unit(), 30 * wxGetApp().em_unit() / 10))
|
||||
{
|
||||
GetDropDown().SetUseContentWidth(true,true);
|
||||
}
|
||||
|
||||
void TabPresetComboBox::OnSelect(wxCommandEvent &evt)
|
||||
|
||||
@@ -30,7 +30,7 @@ static int _ITEM_WIDTH() { return _scale(30); }
|
||||
#define SLIDER_SCALE_10(val) ((val) / 0.01)
|
||||
#define SLIDER_UNSCALE_10(val) ((val) * 0.01)
|
||||
#define LEFT_RIGHT_PADING FromDIP(20)
|
||||
#define FONT_COLOR wxColour("#262E30")
|
||||
#define FONT_COLOR wxColour("#363636") // label color
|
||||
|
||||
wxDEFINE_EVENT(wxEVT_THREAD_DONE, wxCommandEvent);
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "Widgets/Label.hpp"
|
||||
#include "Widgets/Button.hpp"
|
||||
#include "Widgets/CheckBox.hpp"
|
||||
#include "Widgets/DialogButtons.hpp"
|
||||
#include "CapsuleButton.hpp"
|
||||
#include "PrePrintChecker.hpp"
|
||||
|
||||
@@ -37,7 +38,7 @@ using namespace Slic3r::GUI;
|
||||
#define SyncAmsInfoDialogWidth FromDIP(675)
|
||||
#define SyncAmsInfoDialogHeightMIN FromDIP(620)
|
||||
#define SyncAmsInfoDialogHeightMIDDLE FromDIP(630)
|
||||
#define SyncAmsInfoDialogHeightMAX FromDIP(660)
|
||||
#define SyncAmsInfoDialogHeightMAX FromDIP(700)
|
||||
#define SyncLabelWidth FromDIP(640)
|
||||
#define SyncAttentionTipWidth FromDIP(550)
|
||||
namespace Slic3r { namespace GUI {
|
||||
@@ -282,14 +283,14 @@ wxBoxSizer *SyncAmsInfoDialog::create_sizer_thumbnail(wxButton *image_button, bo
|
||||
if (left) {
|
||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto sync_text = new Label(image_button->GetParent(), _CTX(L_CONTEXT("Original", "Sync_AMS"), "Sync_AMS"));
|
||||
sync_text->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
sync_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
text_sizer->Add(sync_text, 0, wxALIGN_CENTER | wxALL, 0);
|
||||
sizer_thumbnail->Add(sync_text, FromDIP(0), wxALIGN_CENTER | wxALL, FromDIP(4));
|
||||
}
|
||||
else {
|
||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_after_map_text = new Label(image_button->GetParent(), _L("After mapping"));
|
||||
m_after_map_text->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_after_map_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
text_sizer->Add(m_after_map_text, 0, wxALIGN_CENTER | wxALL, 0);
|
||||
sizer_thumbnail->Add(m_after_map_text, FromDIP(0), wxALIGN_CENTER | wxALL, FromDIP(4));
|
||||
}
|
||||
@@ -655,10 +656,6 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
// font
|
||||
SetFont(wxGetApp().normal_font());
|
||||
|
||||
// icon
|
||||
std::string icon_path = (boost::format("%1%/images/OrcaSlicerTitle.ico") % resources_dir()).str();
|
||||
SetIcon(wxIcon(encode_path(icon_path.c_str()), wxBITMAP_TYPE_ICO));
|
||||
|
||||
Freeze();
|
||||
SetBackgroundColour(m_colour_def_color);
|
||||
|
||||
@@ -733,7 +730,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
m_colormap_btn->Bind(wxEVT_BUTTON, &SyncAmsInfoDialog::update_when_change_map_mode,this); // update_when_change_map_mode(e.GetSelection());
|
||||
m_override_btn->Bind(wxEVT_BUTTON, &SyncAmsInfoDialog::update_when_change_map_mode,this);
|
||||
|
||||
bSizer->Add(m_mode_combox_sizer, FromDIP(0), wxEXPAND | wxTOP, FromDIP(10));
|
||||
bSizer->Add(m_mode_combox_sizer, FromDIP(0), wxEXPAND | wxTOP | wxBOTTOM, FromDIP(10));
|
||||
}
|
||||
|
||||
m_basic_panel = new wxPanel(m_scrolledWindow, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL);
|
||||
@@ -847,8 +844,8 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
|
||||
sizer_advanced_options_title = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto advanced_options_title = new Label(m_scrolledWindow, _L("Advanced Options"));
|
||||
advanced_options_title->SetFont(::Label::Body_13);
|
||||
advanced_options_title->SetForegroundColour(wxColour(38, 46, 48));
|
||||
advanced_options_title->SetFont(::Label::Head_14); // ORCA
|
||||
advanced_options_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
|
||||
sizer_advanced_options_title->Add(0, 0, 1, wxEXPAND, 0);
|
||||
sizer_advanced_options_title->Add(advanced_options_title, 0, wxALIGN_CENTER, 0);
|
||||
@@ -914,13 +911,15 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
{//new content//tip confirm ok button
|
||||
wxBoxSizer *tip_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_attention_text = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Tip") + ": ");
|
||||
m_attention_text->SetFont(::Label::Head_14);
|
||||
m_attention_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#009688"))); // ORCA match label colors
|
||||
tip_sizer->Add(m_attention_text, 0, wxALIGN_LEFT | wxTOP, FromDIP(2));
|
||||
m_tip_attention_color_map = _L("Only synchronize filament type and color, not including AMS slot information.");
|
||||
m_tip_attention_override = _L("Replace the project filaments list sequentially based on printer filaments. And unused printer filaments will be automatically added to the end of the list.");
|
||||
m_tip_text = new Label(m_scrolledWindow, m_tip_attention_color_map, LB_AUTO_WRAP);
|
||||
m_tip_text->SetMinSize(wxSize(SyncAttentionTipWidth, -1));
|
||||
m_tip_text->SetMaxSize(wxSize(SyncAttentionTipWidth, -1));
|
||||
m_tip_text->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_tip_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
tip_sizer->Add(m_tip_text, 0, wxALIGN_LEFT | wxTOP, FromDIP(2));
|
||||
tip_sizer->AddSpacer(FromDIP(20));
|
||||
bSizer->Add(tip_sizer, 0, wxEXPAND | wxLEFT, FromDIP(25));
|
||||
@@ -931,7 +930,8 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
|
||||
m_advace_setting_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_more_setting_tips = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Advanced settings"));
|
||||
m_more_setting_tips->SetForegroundColour(wxColour(0, 137, 123));
|
||||
m_more_setting_tips->SetFont(::Label::Head_14); // ORCA
|
||||
m_more_setting_tips->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_more_setting_tips->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
|
||||
m_expand_more_settings = !m_expand_more_settings;
|
||||
update_more_setting(true,true);
|
||||
@@ -959,6 +959,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
m_append_color_sizer->Add(m_append_color_checkbox, 0, wxALIGN_LEFT | wxTOP, FromDIP(4));
|
||||
const int gap_between_checebox_and_text = 2;
|
||||
m_append_color_text = new Label(m_scrolledWindow, _L("Add unused AMS filaments to filaments list."));
|
||||
m_append_color_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_append_color_text->Hide();
|
||||
m_append_color_sizer->AddSpacer(FromDIP(gap_between_checebox_and_text));
|
||||
m_append_color_sizer->Add(m_append_color_text, 0, wxALIGN_LEFT | wxTOP, FromDIP(4));
|
||||
@@ -981,6 +982,7 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
|
||||
|
||||
m_merge_color_text = new Label(m_scrolledWindow, _L("Automatically merge the same colors in the model after mapping."));
|
||||
m_merge_color_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_merge_color_text->Hide();
|
||||
m_merge_color_sizer->AddSpacer(FromDIP(gap_between_checebox_and_text));
|
||||
m_merge_color_sizer->Add(m_merge_color_text, 0, wxALIGN_LEFT | wxTOP, FromDIP(2));
|
||||
@@ -994,17 +996,19 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
m_override_undone_str = _L("After being synced, this action cannot be undone.");
|
||||
m_undone_str = _L("After being synced, the project's filament presets and colors will be replaced with the mapped filament types and colors. This action cannot be undone.");
|
||||
m_confirm_title = new Label(m_scrolledWindow, m_undone_str, LB_AUTO_WRAP);
|
||||
m_confirm_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_confirm_title->SetMinSize(wxSize(SyncLabelWidth, -1));
|
||||
m_confirm_title->SetMaxSize(wxSize(SyncLabelWidth, -1));
|
||||
confirm_boxsizer->Add(m_confirm_title, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP | wxRIGHT, FromDIP(10));
|
||||
confirm_boxsizer->Add(m_confirm_title, 0, wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP | wxRIGHT | wxBOTTOM, FromDIP(10));
|
||||
m_are_you_sure_title = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Are you sure to synchronize the filaments?"));
|
||||
m_are_you_sure_title->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
//m_are_you_sure_title->SetFont(Label::Head_14);
|
||||
confirm_boxsizer->Add(m_are_you_sure_title, 0, wxALIGN_LEFT | wxTOP, FromDIP(0));
|
||||
bSizer->Add(confirm_boxsizer, 0, wxALIGN_LEFT | wxLEFT , FromDIP(25));
|
||||
|
||||
wxBoxSizer *warning_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
m_warning_text = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Error") + ":");
|
||||
m_warning_text->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_warning_text->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_warning_text->Hide();
|
||||
warning_sizer->Add(m_warning_text, 0, wxALIGN_CENTER | wxTOP, FromDIP(2));
|
||||
bSizer->Add(warning_sizer, 0, wxEXPAND | wxLEFT, FromDIP(25));
|
||||
@@ -1012,46 +1016,22 @@ SyncAmsInfoDialog::SyncAmsInfoDialog(wxWindow *parent, SyncInfo &info) :
|
||||
m_scrolledWindow->SetSizerAndFit(m_sizer_main);
|
||||
m_sizer_show_page->Add(m_scrolledWindow, 1, wxEXPAND, 0);
|
||||
|
||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||
/* m_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
|
||||
bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT);*/
|
||||
bSizer_button->AddStretchSpacer(1);
|
||||
StateColor btn_bg_green(std::pair<wxColour, int>(wxColour(0, 137, 123), StateColor::Pressed), std::pair<wxColour, int>(wxColour(38, 166, 154), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(AMS_CONTROL_BRAND_COLOUR, StateColor::Normal));
|
||||
m_button_ok = new Button(m_show_page, _L("Synchronize now"));
|
||||
m_button_ok->SetBackgroundColor(btn_bg_green);
|
||||
m_button_ok->SetBorderColor(*wxWHITE);
|
||||
m_button_ok->SetTextColor(wxColour("#FFFFFE"));
|
||||
m_button_ok->SetFont(Label::Body_12);
|
||||
m_button_ok->SetSize(OK_BUTTON_SIZE);
|
||||
m_button_ok->SetMinSize(OK_BUTTON_SIZE);
|
||||
m_button_ok->SetCornerRadius(FromDIP(12));
|
||||
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
|
||||
|
||||
auto* dlg_btns = new DialogButtons(m_show_page, {"OK", "Cancel"});
|
||||
m_button_ok = dlg_btns->GetOK();
|
||||
m_button_ok->SetLabel(_L("Synchronize now"));
|
||||
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
||||
deal_ok();
|
||||
EndModal(wxID_YES);
|
||||
SetFocusIgnoringChildren();
|
||||
});
|
||||
|
||||
StateColor btn_bg_white(std::pair<wxColour, int>(wxColour(206, 206, 206), StateColor::Pressed), std::pair<wxColour, int>(wxColour(238, 238, 238), StateColor::Hovered),
|
||||
std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
|
||||
|
||||
m_button_cancel = new Button(m_show_page, m_input_info.cancel_text_to_later ? _L("Later") : _L("Cancel"));
|
||||
m_button_cancel->SetBackgroundColor(btn_bg_white);
|
||||
m_button_cancel->SetBorderColor(wxColour(38, 46, 48));
|
||||
m_button_cancel->SetFont(Label::Body_12);
|
||||
m_button_cancel->SetSize(CANCEL_BUTTON_SIZE);
|
||||
m_button_cancel->SetMinSize(CANCEL_BUTTON_SIZE);
|
||||
m_button_cancel->SetCornerRadius(FromDIP(12));
|
||||
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT | wxTOP, FromDIP(10));
|
||||
|
||||
m_button_cancel = dlg_btns->GetCANCEL();
|
||||
m_button_cancel->SetLabel(m_input_info.cancel_text_to_later ? _L("Later") : _L("Cancel"));
|
||||
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
||||
EndModal(wxID_CANCEL);
|
||||
});
|
||||
|
||||
m_sizer_show_page->Add(bSizer_button, 0, wxEXPAND | wxLEFT | wxRIGHT | wxBOTTOM, FromDIP(20));
|
||||
m_sizer_show_page->Add(dlg_btns, 0, wxEXPAND);
|
||||
m_show_page->SetSizer(m_sizer_show_page);
|
||||
}
|
||||
show_print_failed_info(false);
|
||||
@@ -2480,10 +2460,10 @@ void SyncAmsInfoDialog::on_dpi_changed(const wxRect &suggested_rect)
|
||||
}
|
||||
m_swipe_left_button->msw_rescale();
|
||||
m_swipe_right_button->msw_rescale();
|
||||
m_button_ok->SetMinSize(OK_BUTTON_SIZE);
|
||||
m_button_ok->SetCornerRadius(FromDIP(12));
|
||||
m_button_cancel->SetMinSize(CANCEL_BUTTON_SIZE);
|
||||
m_button_cancel->SetCornerRadius(FromDIP(12));
|
||||
//m_button_ok->SetMinSize(OK_BUTTON_SIZE); // ORCA DialogButtons automatically manages style and size
|
||||
//m_button_ok->SetCornerRadius(FromDIP(12));
|
||||
//m_button_cancel->SetMinSize(CANCEL_BUTTON_SIZE);
|
||||
//m_button_cancel->SetCornerRadius(FromDIP(12));
|
||||
m_merge_color_checkbox->Rescale();
|
||||
m_append_color_checkbox->Rescale();
|
||||
m_combobox_plate->Rescale();
|
||||
@@ -2628,14 +2608,14 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
|
||||
is_first_row = false;
|
||||
if (!m_original_in_colormap) {
|
||||
m_original_in_colormap = new wxStaticText(m_filament_panel, wxID_ANY, _CTX(L_CONTEXT("Original", "Sync_AMS"), "Sync_AMS") + ":");
|
||||
m_original_in_colormap->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_original_in_colormap->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_original_in_colormap->SetFont(::Label::Head_12);
|
||||
}
|
||||
ams_tip_sizer->Add(m_original_in_colormap, 0, wxALIGN_LEFT | wxTOP, FromDIP(6));
|
||||
|
||||
if (!m_ams_or_ext_text_in_colormap) {
|
||||
m_ams_or_ext_text_in_colormap = new wxStaticText(m_filament_panel, wxID_ANY, _L("AMS") + ":");
|
||||
m_ams_or_ext_text_in_colormap->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_ams_or_ext_text_in_colormap->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_ams_or_ext_text_in_colormap->SetFont(::Label::Head_12);
|
||||
}
|
||||
ams_tip_sizer->Add(m_ams_or_ext_text_in_colormap, 0, wxALIGN_LEFT | wxTOP, FromDIP(9));
|
||||
@@ -2840,7 +2820,7 @@ void SyncAmsInfoDialog::generate_override_fix_ams_list()
|
||||
is_first_row = false;
|
||||
if (!m_original_in_override) {
|
||||
m_original_in_override = new wxStaticText(m_fix_filament_panel, wxID_ANY, _CTX(L_CONTEXT("Original", "Sync_AMS"), "Sync_AMS") + ":");
|
||||
m_original_in_override->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_original_in_override->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_original_in_override->SetFont(::Label::Head_12);
|
||||
}
|
||||
ams_tip_sizer->Add(m_original_in_override, 0, wxALIGN_LEFT | wxTOP, FromDIP(6));
|
||||
@@ -2848,7 +2828,7 @@ void SyncAmsInfoDialog::generate_override_fix_ams_list()
|
||||
if (!m_ams_or_ext_text_in_override) {
|
||||
auto text = (m_only_exist_ext_spool_flag ? _L("Ext spool") : _L("AMS")) + ":";
|
||||
m_ams_or_ext_text_in_override = new wxStaticText(m_fix_filament_panel, wxID_ANY, text);
|
||||
m_ams_or_ext_text_in_override->SetForegroundColour(wxColour(107, 107, 107, 100));
|
||||
m_ams_or_ext_text_in_override->SetForegroundColour(StateColor::darkModeColorFor(wxColour("#363636"))); // ORCA match label colors
|
||||
m_ams_or_ext_text_in_override->SetFont(::Label::Head_12);
|
||||
}
|
||||
ams_tip_sizer->Add(m_ams_or_ext_text_in_override, 0, wxALIGN_LEFT | wxTOP, FromDIP(9));
|
||||
@@ -3236,10 +3216,12 @@ SyncNozzleAndAmsDialog::SyncNozzleAndAmsDialog(InputInfo &input_info)
|
||||
wxGetApp().preset_bundle->get_printer_extruder_count() == 1 ? 370 :320,
|
||||
input_info.dialog_pos,
|
||||
90,
|
||||
(
|
||||
wxGetApp().preset_bundle->get_printer_extruder_count() == 1 ? _L("Successfully synchronized nozzle information.") :
|
||||
_L("Successfully synchronized nozzle and AMS number information."),
|
||||
_L("Continue to sync filaments"),
|
||||
_CTX(L_CONTEXT("Cancel", "Sync_Nozzle_AMS"), "Sync_Nozzle_AMS"),
|
||||
_L("Successfully synchronized nozzle and AMS number information.")
|
||||
) + "\n\n" + _L("Do you want to continue to sync filaments?"),
|
||||
_L("Yes"), // ORCA use shorter text for buttons
|
||||
_CTX(L_CONTEXT(_L("No"), "Sync_Nozzle_AMS"), "Sync_Nozzle_AMS"),
|
||||
DisappearanceMode::TimedDisappearance)
|
||||
, m_input_info(input_info)
|
||||
{
|
||||
|
||||
@@ -2658,7 +2658,7 @@ void TabPrint::build()
|
||||
optgroup->append_single_option_line("ironing_angle", "quality_settings_ironing#angle-offset");
|
||||
optgroup->append_single_option_line("ironing_angle_fixed", "quality_settings_ironing#fixed-angle");
|
||||
|
||||
optgroup = page->new_optgroup(L("Z contouring"), L"param_advanced");
|
||||
optgroup = page->new_optgroup(L("Z contouring"), L"param_z_contouring");
|
||||
optgroup->append_single_option_line("zaa_enabled", "quality_settings_z_contouring");
|
||||
optgroup->append_single_option_line("zaa_minimize_perimeter_height", "quality_settings_z_contouring#minimize-wall-height-angle");
|
||||
optgroup->append_single_option_line("zaa_min_z", "quality_settings_z_contouring#minimum-z-height");
|
||||
|
||||
@@ -1471,12 +1471,24 @@ FlowRateCalibrationDialog::FlowRateCalibrationDialog(wxWindow* parent, wxWindowI
|
||||
type_box->Add(m_rbType, 0, wxALL | wxEXPAND, FromDIP(4));
|
||||
v_sizer->Add(type_box, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
||||
|
||||
// Pattern selection
|
||||
auto labeled_box_pattern = new LabeledStaticBox(this, _L("Top Surface Pattern"));
|
||||
auto pattern_box = new wxStaticBoxSizer(labeled_box_pattern, wxVERTICAL);
|
||||
// Settings
|
||||
auto stb = new LabeledStaticBox(this, _L("Settings"));
|
||||
auto settings_sizer = new wxStaticBoxSizer(stb, wxVERTICAL);
|
||||
|
||||
wxString pattern_str = _L("Top Surface Pattern");
|
||||
int text_max = GetTextMax(this, std::vector<wxString>{pattern_str});
|
||||
|
||||
settings_sizer->AddSpacer(FromDIP(5));
|
||||
|
||||
auto st_size = wxSize(text_max, -1);
|
||||
auto ti_size = FromDIP(wxSize(120, -1));
|
||||
|
||||
// Top surface pattern
|
||||
auto pattern_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||
auto pattern_text = new wxStaticText(this, wxID_ANY, pattern_str, wxDefaultPosition, st_size, wxALIGN_LEFT);
|
||||
|
||||
// ORCA: Use ComboBox with icons instead of RadioGroup
|
||||
m_rbPattern = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, nullptr, wxCB_READONLY);
|
||||
m_rbPattern = new ComboBox(this, wxID_ANY, wxEmptyString, wxDefaultPosition, ti_size, 0, nullptr, wxCB_READONLY);
|
||||
|
||||
boost::filesystem::path image_path(Slic3r::resources_dir());
|
||||
image_path /= "images";
|
||||
@@ -1497,9 +1509,13 @@ FlowRateCalibrationDialog::FlowRateCalibrationDialog(wxWindow* parent, wxWindowI
|
||||
m_rbPattern->SetSelection(0); // Default to Archimedean Chords
|
||||
// ORCA: explicit set value to ensure display on Windows
|
||||
m_rbPattern->SetValue(m_rbPattern->GetString(0));
|
||||
m_rbPattern->GetDropDown().SetUseContentWidth(true);
|
||||
|
||||
pattern_box->Add(m_rbPattern, 0, wxALL | wxEXPAND, FromDIP(4));
|
||||
v_sizer->Add(pattern_box, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
||||
pattern_sizer->Add(pattern_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||
pattern_sizer->Add(m_rbPattern , 0, wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||
settings_sizer->Add(pattern_sizer, 0, wxLEFT, FromDIP(3));
|
||||
|
||||
v_sizer->Add(settings_sizer, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
||||
|
||||
v_sizer->AddSpacer(FromDIP(5));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user