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:
@@ -1,3 +1,3 @@
|
|||||||
<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="19" height="20" viewBox="0 0 19 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M12.9742 9.65669C13.2353 9.91782 13.2353 10.3401 12.9742 10.5984L7.64038 15.935C7.37924 16.1961 6.95698 16.1961 6.69863 15.935C6.44027 15.6739 6.43749 15.2516 6.69863 14.9933L11.5602 10.1317L6.69585 5.26742C6.43472 5.00628 6.43472 4.58403 6.69585 4.32567C6.95698 4.06731 7.37924 4.06454 7.6376 4.32567L12.9742 9.65669Z" fill="#009688"/>
|
<path d="M12.9742 9.65669C13.2353 9.91782 13.2353 10.3401 12.9742 10.5984L7.64038 15.935C7.37924 16.1961 6.95698 16.1961 6.69863 15.935C6.44027 15.6739 6.43749 15.2516 6.69863 14.9933L11.5602 10.1317L6.69585 5.26742C6.43472 5.00628 6.43472 4.58403 6.69585 4.32567C6.95698 4.06731 7.37924 4.06454 7.6376 4.32567L12.9742 9.65669Z" fill="#949494"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 449 B After Width: | Height: | Size: 449 B |
@@ -1,3 +1,3 @@
|
|||||||
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
<path d="M10.5084 13.1962C10.2472 13.4574 9.82496 13.4574 9.5666 13.1962L4.23003 7.86242C3.9689 7.60129 3.9689 7.17903 4.23003 6.92068C4.49116 6.66232 4.91342 6.65954 5.17178 6.92068L10.0333 11.7822L14.8976 6.9179C15.1588 6.65676 15.581 6.65676 15.8394 6.9179C16.0977 7.17903 16.1005 7.60129 15.8394 7.85965L10.5084 13.1962Z" fill="#009688"/>
|
<path d="M10.5084 13.1962C10.2472 13.4574 9.82496 13.4574 9.5666 13.1962L4.23003 7.86242C3.9689 7.60129 3.9689 7.17903 4.23003 6.92068C4.49116 6.66232 4.91342 6.65954 5.17178 6.92068L10.0333 11.7822L14.8976 6.9179C15.1588 6.65676 15.581 6.65676 15.8394 6.9179C16.0977 7.17903 16.1005 7.60129 15.8394 7.85965L10.5084 13.1962Z" fill="#949494"/>
|
||||||
</svg>
|
</svg>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 446 B After Width: | Height: | Size: 446 B |
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><svg id="a" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18"><line x1="2.5" y1="14.5" x2="16.5" y2="14.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="2.5" y1="16.5" x2="16.5" y2="16.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="16.5" y1="12.5" x2="2.67" y2="12.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="16.5" y1="10.5" x2="3.19" y2="10.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="4.11" y1="8.5" x2="16.5" y2="8.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="16.5" y1="6.5" x2="5.56" y2="6.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="7.87" y1="4.5" x2="16.5" y2="4.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><line x1="12.92" y1="2.5" x2="16.5" y2="2.5" style="fill:none; stroke:#949494; stroke-linecap:square; stroke-miterlimit:10;"/><path d="M.5,16.5v-2C.5,6.77,6.77.5,14.5.5h2" style="fill:none; stroke:#009688; stroke-linecap:square; stroke-miterlimit:10;"/></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@@ -324,10 +324,12 @@ AboutDialog::AboutDialog()
|
|||||||
m_html->SetFonts(font.GetFaceName(), font.GetFaceName(), size);
|
m_html->SetFonts(font.GetFaceName(), font.GetFaceName(), size);
|
||||||
m_html->SetMinSize(wxSize(FromDIP(-1), FromDIP(16)));
|
m_html->SetMinSize(wxSize(FromDIP(-1), FromDIP(16)));
|
||||||
m_html->SetBorders(2);
|
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(
|
const auto text = from_u8(
|
||||||
(boost::format(
|
(boost::format(
|
||||||
"<html>"
|
"<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>"
|
"<p style=\"text-align:left\"><a style=\"color:#009789\" href=\"https://www.orcaslicer.com\">https://www.orcaslicer.com</ a></p>"
|
||||||
"</body>"
|
"</body>"
|
||||||
"</html>")
|
"</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);
|
dc.DrawRoundedRectangle(1, 1, MATERIAL_ITEM_SIZE.x - 1, MATERIAL_ITEM_SIZE.y - 1, 5);
|
||||||
|
|
||||||
if (m_selected) {
|
if (m_selected) {
|
||||||
dc.SetPen(wxColour(0x00, 0xAE, 0x42));
|
dc.SetPen(wxColour("#009688")); // ORCA selected item border color
|
||||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
dc.DrawRoundedRectangle(1, 1, MATERIAL_ITEM_SIZE.x - 1, MATERIAL_ITEM_SIZE.y - 1, 5);
|
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);
|
dc.DrawRoundedRectangle(0, 0, MATERIAL_ITEM_SIZE.x, MATERIAL_ITEM_SIZE.y, 5);
|
||||||
|
|
||||||
if (m_selected) {
|
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.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
dc.DrawRoundedRectangle(FromDIP(1), FromDIP(1), MATERIAL_ITEM_SIZE.x - FromDIP(1), MATERIAL_ITEM_SIZE.y - FromDIP(1), 5);
|
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));
|
m_split_left_line->SetMaxSize(wxSize(-1, 1));
|
||||||
sizer_split_ams->Add(0, 0, 0, wxEXPAND, 0);
|
sizer_split_ams->Add(0, 0, 0, wxEXPAND, 0);
|
||||||
sizer_split_ams->Add(ams_title_text, 0, wxALIGN_CENTER, 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;
|
return sizer_split_ams;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1420,7 +1420,7 @@ bool AmsMapingPopup::ProcessLeftDown(wxMouseEvent &event)
|
|||||||
void AmsMapingPopup::paintEvent(wxPaintEvent &evt)
|
void AmsMapingPopup::paintEvent(wxPaintEvent &evt)
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
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.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
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)
|
void AmsReplaceMaterialDialog::paintEvent(wxPaintEvent& evt)
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
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.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
dc.DrawRoundedRectangle(0, 0, GetSize().x, GetSize().y, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,19 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
|||||||
// SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
|
// SetBackgroundStyle(wxBackgroundStyle::wxBG_STYLE_TRANSPARENT);
|
||||||
SetTransparent(m_init_transparent);
|
SetTransparent(m_init_transparent);
|
||||||
SetBackgroundColour(wxColour(23, 25, 22, 128));
|
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
|
//Adaptive Frame Width
|
||||||
wxClientDC dc(parent);
|
wxClientDC dc(parent);
|
||||||
wxSize msg_sz = dc.GetMultiLineTextExtent(ok_text);
|
wxSize msg_sz = dc.GetMultiLineTextExtent(ok_text);
|
||||||
@@ -44,21 +57,16 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
|||||||
|
|
||||||
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
m_sizer_main = new wxBoxSizer(wxVERTICAL);
|
||||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
text_sizer->AddSpacer(FromDIP(20));
|
|
||||||
auto image_sizer = new wxBoxSizer(wxVERTICAL);
|
auto completedimg = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("completed", this, imgsize), wxDefaultPosition, FromDIP(wxSize(imgsize, imgsize)), 0);
|
||||||
auto imgsize = FromDIP(25);
|
|
||||||
auto completedimg = new wxStaticBitmap(this, wxID_ANY, create_scaled_bitmap("completed", this, 25), wxDefaultPosition, wxSize(imgsize, imgsize), 0);
|
text_sizer->Add(completedimg, 0, wxALIGN_CENTER_VERTICAL | wxRIGHT, FromDIP(imgright));
|
||||||
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));
|
|
||||||
m_finish_text = new Label(this, win_text, LB_AUTO_WRAP);
|
m_finish_text = new Label(this, win_text, LB_AUTO_WRAP);
|
||||||
m_finish_text->SetMinSize(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 - 64), -1));
|
m_finish_text->SetMaxSize(wxSize(FromDIP(win_width - (window_padding * 2 + imgright + imgsize)), -1));
|
||||||
m_finish_text->SetForegroundColour(wxColour(255, 255, 255, 255));
|
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->Add(m_finish_text, 0, wxALIGN_CENTER_VERTICAL);
|
||||||
text_sizer->AddSpacer(FromDIP(20));
|
m_sizer_main->Add(text_sizer, 0, wxALL, FromDIP(15));
|
||||||
m_sizer_main->Add(text_sizer, FromDIP(0), wxALIGN_LEFT | wxALIGN_CENTER_VERTICAL | wxTOP, FromDIP(15));
|
|
||||||
|
|
||||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
||||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
||||||
@@ -66,22 +74,18 @@ BaseTransparentDPIFrame::BaseTransparentDPIFrame(
|
|||||||
bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT);*/
|
bSizer_button->Add(m_checkbox, 0, wxALIGN_LEFT);*/
|
||||||
bSizer_button->AddStretchSpacer(1);
|
bSizer_button->AddStretchSpacer(1);
|
||||||
m_button_ok = new Button(this, ok_text);
|
m_button_ok = new Button(this, ok_text);
|
||||||
m_button_ok->SetStyle(ButtonStyle::Confirm, ButtonType::Window);
|
m_button_ok->SetStyle(ButtonStyle::Confirm, ButtonType::Choice);
|
||||||
m_button_ok->SetSize(wxSize(FromDIP(60), FromDIP(30)));
|
bSizer_button->Add(m_button_ok, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
|
||||||
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->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_ok(); });
|
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_ok(); });
|
||||||
|
|
||||||
m_button_cancel = new Button(this, cancel_text);
|
m_button_cancel = new Button(this, cancel_text);
|
||||||
m_button_cancel->SetStyle(ButtonStyle::Regular, ButtonType::Window);
|
m_button_cancel->SetStyle(ButtonStyle::Regular, ButtonType::Choice);
|
||||||
m_button_cancel->SetSize(wxSize(FromDIP(65), FromDIP(30)));
|
bSizer_button->Add(m_button_cancel, 0, wxALIGN_RIGHT | wxLEFT, FromDIP(10));
|
||||||
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->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) { deal_cancel(); });
|
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) {
|
Bind(wxEVT_CLOSE_WINDOW, [this](auto &e) {
|
||||||
on_hide();
|
on_hide();
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
#include <boost/nowide/convert.hpp>
|
#include <boost/nowide/convert.hpp>
|
||||||
|
|
||||||
#include <wx/sizer.h>
|
#include <wx/sizer.h>
|
||||||
#include <wx/button.h>
|
|
||||||
#include <wx/listctrl.h>
|
#include <wx/listctrl.h>
|
||||||
#include <wx/stattext.h>
|
#include <wx/stattext.h>
|
||||||
#include <wx/timer.h>
|
#include <wx/timer.h>
|
||||||
@@ -20,6 +19,8 @@
|
|||||||
#include "slic3r/GUI/format.hpp"
|
#include "slic3r/GUI/format.hpp"
|
||||||
#include "slic3r/Utils/Bonjour.hpp"
|
#include "slic3r/Utils/Bonjour.hpp"
|
||||||
|
|
||||||
|
#include "slic3r/GUI/Widgets/DialogButtons.hpp"
|
||||||
|
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
|
|
||||||
@@ -63,30 +64,30 @@ BonjourDialog::BonjourDialog(wxWindow *parent, Slic3r::PrinterTechnology tech)
|
|||||||
, timer_state(0)
|
, timer_state(0)
|
||||||
, tech(tech)
|
, tech(tech)
|
||||||
{
|
{
|
||||||
|
SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
const int em = GUI::wxGetApp().em_unit();
|
const int em = GUI::wxGetApp().em_unit();
|
||||||
list->SetMinSize(wxSize(80 * em, 30 * em));
|
list->SetMinSize(wxSize(80 * em, 30 * em));
|
||||||
|
|
||||||
wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
|
wxBoxSizer *vsizer = new wxBoxSizer(wxVERTICAL);
|
||||||
|
|
||||||
|
label->SetFont(Label::Body_14);
|
||||||
vsizer->Add(label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
|
vsizer->Add(label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
|
||||||
|
|
||||||
list->SetSingleStyle(wxLC_SINGLE_SEL);
|
list->SetSingleStyle(wxLC_SINGLE_SEL);
|
||||||
list->SetSingleStyle(wxLC_SORT_DESCENDING);
|
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("Hostname")), wxLIST_FORMAT_LEFT, 10 * em);
|
||||||
list->AppendColumn(_(L("Service name")), wxLIST_FORMAT_LEFT, 20 * em);
|
list->AppendColumn(_(L("Service name")), wxLIST_FORMAT_LEFT, 20 * em);
|
||||||
if (tech == ptFFF) {
|
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);
|
vsizer->Add(list, 1, wxEXPAND | wxALL, em);
|
||||||
|
|
||||||
wxBoxSizer *button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto dlg_btns = new GUI::DialogButtons(this, {"OK", "Cancel"});
|
||||||
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
|
|
||||||
|
|
||||||
vsizer->Add(button_sizer, 0, wxALIGN_CENTER);
|
vsizer->Add(dlg_btns, 0, wxEXPAND);
|
||||||
SetSizerAndFit(vsizer);
|
SetSizerAndFit(vsizer);
|
||||||
|
|
||||||
Bind(EVT_BONJOUR_REPLY, &BonjourDialog::on_reply, this);
|
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_list(new wxListView(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_REPORT | wxSIMPLE_BORDER))
|
||||||
, m_selected_index (selected_index)
|
, m_selected_index (selected_index)
|
||||||
{
|
{
|
||||||
|
SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
const int em = GUI::wxGetApp().em_unit();
|
const int em = GUI::wxGetApp().em_unit();
|
||||||
m_list->SetMinSize(wxSize(40 * em, 30 * em));
|
m_list->SetMinSize(wxSize(40 * em, 30 * em));
|
||||||
|
|
||||||
wxBoxSizer* vsizer = new wxBoxSizer(wxVERTICAL);
|
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));
|
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);
|
vsizer->Add(label, 0, wxEXPAND | wxTOP | wxLEFT | wxRIGHT, em);
|
||||||
|
|
||||||
m_list->SetSingleStyle(wxLC_SINGLE_SEL);
|
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);
|
vsizer->Add(m_list, 1, wxEXPAND | wxALL, em);
|
||||||
|
|
||||||
wxBoxSizer* button_sizer = new wxBoxSizer(wxHORIZONTAL);
|
auto dlg_btns = new GUI::DialogButtons(this, {"OK", "Cancel"});
|
||||||
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);
|
|
||||||
|
|
||||||
vsizer->Add(button_sizer, 0, wxALIGN_CENTER);
|
vsizer->Add(dlg_btns, 0, wxEXPAND);
|
||||||
SetSizerAndFit(vsizer);
|
SetSizerAndFit(vsizer);
|
||||||
|
|
||||||
GUI::wxGetApp().UpdateDlgDarkUI(this);
|
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 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
|
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 + 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 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 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
|
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::Spacing();
|
||||||
ImGui::Separator();
|
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_FrameRounding , 3.f * m_scale);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding , ImVec2(2.f, 2.f) * m_scale);
|
ImGui::PushStyleVar(ImGuiStyleVar_FramePadding , ImVec2(2.f, 2.f) * m_scale);
|
||||||
ImGui::PushStyleColor(ImGuiCol_Button , ImVec4(0, 0, 0, 0));
|
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));
|
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 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
|
// 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;
|
const wchar_t foldIcon = properties_shown ? ImGui::UnfoldButtonIcon : ImGui::FoldButtonIcon;
|
||||||
if (imgui.glyph_button(foldIcon, ImVec2(16.f, 16.f) * m_scale)) {
|
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::PopStyleColor(3);
|
||||||
ImGui::PopStyleVar(2);
|
ImGui::PopStyleVar(2);
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SetCursorPos(ImVec2(style.WindowPadding.x + style.ItemSpacing.x + 24.f * m_scale, draw_start_y - 1.f * m_scale));
|
||||||
|
|
||||||
if(!properties_shown)
|
|
||||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - style.FramePadding.y); // aligns button with next group
|
|
||||||
|
|
||||||
ImGui::BeginGroup(); // group contents to make information area more compact
|
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")),
|
create_menu_item( _utf8(L("Realistic View")),
|
||||||
true,
|
m_canvas_type != ECanvasType::CanvasPreview, // not work on preview
|
||||||
cfg->get_bool(SETTING_OPENGL_REALISTIC_MODE),
|
cfg->get_bool(SETTING_OPENGL_REALISTIC_MODE),
|
||||||
[this, &cfg]{
|
[this, &cfg]{
|
||||||
cfg->set_bool(SETTING_OPENGL_REALISTIC_MODE, !cfg->get_bool(SETTING_OPENGL_REALISTIC_MODE));
|
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_spacing_x = 8.0f;
|
||||||
float minimum_offset_x = ImGui::GetCursorPosX() + minimum_spacing_x;
|
float minimum_offset_x = ImGui::GetCursorPosX() + minimum_spacing_x;
|
||||||
float offset_x = std::max(m_gui_cfg->input_offset, minimum_offset_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
|
ImGuiWrapper::push_radio_style(m_parent.get_scale()); // ORCA
|
||||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
||||||
|
|||||||
@@ -1989,7 +1989,7 @@ void GLGizmoSVG::draw_mirroring()
|
|||||||
|
|
||||||
void GLGizmoSVG::draw_model_type()
|
void GLGizmoSVG::draw_model_type()
|
||||||
{
|
{
|
||||||
ImGui::AlignTextToFramePadding();
|
//ImGui::AlignTextToFramePadding();
|
||||||
bool is_last_solid_part = m_volume->is_the_only_one_part();
|
bool is_last_solid_part = m_volume->is_the_only_one_part();
|
||||||
std::string title = _u8L("Operation");
|
std::string title = _u8L("Operation");
|
||||||
if (is_last_solid_part) {
|
if (is_last_solid_part) {
|
||||||
@@ -2005,6 +2005,8 @@ void GLGizmoSVG::draw_model_type()
|
|||||||
ModelVolumeType part = ModelVolumeType::MODEL_PART;
|
ModelVolumeType part = ModelVolumeType::MODEL_PART;
|
||||||
ModelVolumeType type = m_volume->type();
|
ModelVolumeType type = m_volume->type();
|
||||||
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
//TRN EmbossOperation
|
//TRN EmbossOperation
|
||||||
ImGuiWrapper::push_radio_style(m_parent.get_scale()); //ORCA
|
ImGuiWrapper::push_radio_style(m_parent.get_scale()); //ORCA
|
||||||
if (ImGui::RadioButton(_u8L("Join").c_str(), type == part))
|
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"), "");
|
append_submenu(fileMenu, export_menu, wxID_ANY, _L("Export"), "");
|
||||||
|
|
||||||
fileMenu->AppendSeparator();
|
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__
|
#ifndef __APPLE__
|
||||||
append_menu_item(fileMenu, wxID_EXIT, _L("Quit"), wxString::Format(_L("Quit")),
|
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);
|
"", nullptr, []() { return true; }, this);
|
||||||
|
|
||||||
|
m_topbar->GetTopMenu()->AppendSeparator();
|
||||||
|
|
||||||
append_menu_item(
|
append_menu_item(
|
||||||
m_topbar->GetTopMenu(), wxID_ANY, _L("Preset Bundle") + "\t", "",
|
m_topbar->GetTopMenu(), wxID_ANY, _L("Preset Bundle") + "\t", "",
|
||||||
[this](wxCommandEvent &) {
|
[this](wxCommandEvent &) {
|
||||||
@@ -3316,6 +3303,8 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
return wxGetApp().is_user_login() && !wxGetApp().app_config->get_stealth_mode();
|
return wxGetApp().is_user_login() && !wxGetApp().app_config->get_stealth_mode();
|
||||||
}, this);
|
}, this);
|
||||||
|
|
||||||
|
m_topbar->GetTopMenu()->AppendSeparator();
|
||||||
|
|
||||||
//m_topbar->AddDropDownMenuItem(preference_item);
|
//m_topbar->AddDropDownMenuItem(preference_item);
|
||||||
//m_topbar->AddDropDownMenuItem(printer_item);
|
//m_topbar->AddDropDownMenuItem(printer_item);
|
||||||
//m_topbar->AddDropDownMenuItem(language_item);
|
//m_topbar->AddDropDownMenuItem(language_item);
|
||||||
@@ -3425,6 +3414,25 @@ void MainFrame::init_menubar_as_editor()
|
|||||||
plater()->get_current_canvas3D()->force_set_focus();
|
plater()->get_current_canvas3D()->force_set_focus();
|
||||||
},
|
},
|
||||||
"", nullptr, []() { return true; }, this);
|
"", 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")));
|
m_menubar->Append(fileMenu, wxString::Format("&%s", _L("File")));
|
||||||
if (editMenu)
|
if (editMenu)
|
||||||
m_menubar->Append(editMenu, wxString::Format("&%s", _L("Edit")));
|
m_menubar->Append(editMenu, wxString::Format("&%s", _L("Edit")));
|
||||||
|
|||||||
+17
-20
@@ -537,6 +537,7 @@ struct Sidebar::priv
|
|||||||
//wxComboBox * m_comboBox_print_preset;
|
//wxComboBox * m_comboBox_print_preset;
|
||||||
wxStaticLine * m_staticline1;
|
wxStaticLine * m_staticline1;
|
||||||
StaticBox* m_panel_filament_title;
|
StaticBox* m_panel_filament_title;
|
||||||
|
wxPanel* m_panel_filament_separator;
|
||||||
wxStaticText* m_staticText_filament_settings;
|
wxStaticText* m_staticText_filament_settings;
|
||||||
wxStaticText* m_staticText_filament_count;
|
wxStaticText* m_staticText_filament_count;
|
||||||
ScalableButton * m_bpButton_add_filament;
|
ScalableButton * m_bpButton_add_filament;
|
||||||
@@ -556,6 +557,7 @@ struct Sidebar::priv
|
|||||||
|
|
||||||
// BBS printer config
|
// BBS printer config
|
||||||
StaticBox* m_panel_printer_title = nullptr;
|
StaticBox* m_panel_printer_title = nullptr;
|
||||||
|
wxPanel* m_panel_printer_separator = nullptr;
|
||||||
ScalableButton* m_printer_icon = nullptr;
|
ScalableButton* m_printer_icon = nullptr;
|
||||||
ScalableButton* m_printer_connect = nullptr;
|
ScalableButton* m_printer_connect = nullptr;
|
||||||
ScalableButton* m_printer_bbl_sync = nullptr;
|
ScalableButton* m_printer_bbl_sync = nullptr;
|
||||||
@@ -1735,10 +1737,6 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
p->m_panel_printer_title->Layout();
|
p->m_panel_printer_title->Layout();
|
||||||
|
|
||||||
// 1.2 Add spliters around title bar
|
// 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
|
// add printer title
|
||||||
scrolled_sizer->Add(p->m_panel_printer_title, 0, wxEXPAND | wxALL, 0);
|
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()));
|
wxString title = _L("Printer") + wxString(!isShown ? "" : (" | " + p->combo_printer->GetValue()));
|
||||||
p->m_text_printer_settings->SetLabel(title);
|
p->m_text_printer_settings->SetLabel(title);
|
||||||
p->m_panel_printer_content->Show(!isShown);
|
p->m_panel_printer_content->Show(!isShown);
|
||||||
|
p->m_panel_printer_separator->Show(isShown);
|
||||||
m_scrolled_sizer->Layout();
|
m_scrolled_sizer->Layout();
|
||||||
});
|
});
|
||||||
|
// ORCA add bottom border for seperation wile sections folded
|
||||||
// add spliter 2
|
p->m_panel_printer_separator = new wxPanel(p->scrolled, wxID_ANY, wxDefaultPosition, wxSize(-1, FromDIP(2))); // ORCA staticline class not works without string
|
||||||
auto spliter_2 = new ::StaticLine(p->scrolled);
|
p->m_panel_printer_separator->SetBackgroundColour("#FFFFFF");
|
||||||
spliter_2->SetLineColour("#CECECE");
|
scrolled_sizer->Add(p->m_panel_printer_separator, 0, wxEXPAND);
|
||||||
scrolled_sizer->Add(spliter_2, 0, wxEXPAND);
|
|
||||||
|
|
||||||
|
|
||||||
/*************************** 2. add printer content ************************/
|
/*************************** 2. add printer content ************************/
|
||||||
|
|
||||||
@@ -1937,9 +1934,9 @@ Sidebar::Sidebar(Plater *parent)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wxGridSizer *nozzle_dia_sizer = new wxGridSizer(3, 1, FromDIP(2), 0);
|
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->label_nozzle_title, 1, wxALIGN_CENTER | wxTOP , FromDIP(2));
|
||||||
nozzle_dia_sizer->Add(p->combo_nozzle_dia , 0, wxALIGN_CENTER | wxTOP | wxBOTTOM, FromDIP(2));
|
nozzle_dia_sizer->Add(p->combo_nozzle_dia , 0, wxALIGN_CENTER);
|
||||||
nozzle_dia_sizer->Add(p->label_nozzle_type , 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);
|
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;
|
else if (ams_btn->IsShown()) exclude_pt = ams_btn->GetPosition().x;
|
||||||
if (e.GetPosition().x > exclude_pt)
|
if (e.GetPosition().x > exclude_pt)
|
||||||
return;
|
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();
|
m_scrolled_sizer->Layout();
|
||||||
|
|
||||||
CallAfter([this]{update_filaments_counter(true);}); // call after all UI processing done
|
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->SetSizer( bSizer39 );
|
||||||
p->m_panel_filament_title->Layout();
|
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);
|
scrolled_sizer->Add(p->m_panel_filament_title, 0, wxEXPAND | wxALL, 0);
|
||||||
auto spliter_2 = new ::StaticLine(p->scrolled);
|
// ORCA add bottom border for seperation wile sections folded
|
||||||
spliter_2->SetLineColour("#CECECE");
|
p->m_panel_filament_separator = new wxPanel(p->scrolled, wxID_ANY, wxDefaultPosition, wxSize(-1, FromDIP(2))); // ORCA staticline class not works without string
|
||||||
scrolled_sizer->Add(spliter_2, 0, wxEXPAND);
|
p->m_panel_filament_separator->SetBackgroundColour("#FFFFFF");
|
||||||
|
scrolled_sizer->Add(p->m_panel_filament_separator, 0, wxEXPAND);
|
||||||
|
|
||||||
bSizer39->AddStretchSpacer(1);
|
bSizer39->AddStretchSpacer(1);
|
||||||
|
|
||||||
|
|||||||
@@ -797,7 +797,7 @@ wxBoxSizer *PreferencesDialog::create_item_decimal_input(wxString title, wxStrin
|
|||||||
input->SetToolTip(tooltip);
|
input->SetToolTip(tooltip);
|
||||||
input->GetTextCtrl()->SetValidator(validator);
|
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 apply_value = [this, param, input, min, max, decimals]() {
|
||||||
auto value = input->GetTextCtrl()->GetValue();
|
auto value = input->GetTextCtrl()->GetValue();
|
||||||
|
|||||||
@@ -1600,6 +1600,7 @@ TabPresetComboBox::TabPresetComboBox(wxWindow* parent, Preset::Type preset_type)
|
|||||||
// BBS: new layout
|
// BBS: new layout
|
||||||
PresetComboBox(parent, preset_type, wxSize(20 * wxGetApp().em_unit(), 30 * wxGetApp().em_unit() / 10))
|
PresetComboBox(parent, preset_type, wxSize(20 * wxGetApp().em_unit(), 30 * wxGetApp().em_unit() / 10))
|
||||||
{
|
{
|
||||||
|
GetDropDown().SetUseContentWidth(true,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabPresetComboBox::OnSelect(wxCommandEvent &evt)
|
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_SCALE_10(val) ((val) / 0.01)
|
||||||
#define SLIDER_UNSCALE_10(val) ((val) * 0.01)
|
#define SLIDER_UNSCALE_10(val) ((val) * 0.01)
|
||||||
#define LEFT_RIGHT_PADING FromDIP(20)
|
#define LEFT_RIGHT_PADING FromDIP(20)
|
||||||
#define FONT_COLOR wxColour("#262E30")
|
#define FONT_COLOR wxColour("#363636") // label color
|
||||||
|
|
||||||
wxDEFINE_EVENT(wxEVT_THREAD_DONE, wxCommandEvent);
|
wxDEFINE_EVENT(wxEVT_THREAD_DONE, wxCommandEvent);
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "Widgets/Label.hpp"
|
#include "Widgets/Label.hpp"
|
||||||
#include "Widgets/Button.hpp"
|
#include "Widgets/Button.hpp"
|
||||||
#include "Widgets/CheckBox.hpp"
|
#include "Widgets/CheckBox.hpp"
|
||||||
|
#include "Widgets/DialogButtons.hpp"
|
||||||
#include "CapsuleButton.hpp"
|
#include "CapsuleButton.hpp"
|
||||||
#include "PrePrintChecker.hpp"
|
#include "PrePrintChecker.hpp"
|
||||||
|
|
||||||
@@ -37,7 +38,7 @@ using namespace Slic3r::GUI;
|
|||||||
#define SyncAmsInfoDialogWidth FromDIP(675)
|
#define SyncAmsInfoDialogWidth FromDIP(675)
|
||||||
#define SyncAmsInfoDialogHeightMIN FromDIP(620)
|
#define SyncAmsInfoDialogHeightMIN FromDIP(620)
|
||||||
#define SyncAmsInfoDialogHeightMIDDLE FromDIP(630)
|
#define SyncAmsInfoDialogHeightMIDDLE FromDIP(630)
|
||||||
#define SyncAmsInfoDialogHeightMAX FromDIP(660)
|
#define SyncAmsInfoDialogHeightMAX FromDIP(700)
|
||||||
#define SyncLabelWidth FromDIP(640)
|
#define SyncLabelWidth FromDIP(640)
|
||||||
#define SyncAttentionTipWidth FromDIP(550)
|
#define SyncAttentionTipWidth FromDIP(550)
|
||||||
namespace Slic3r { namespace GUI {
|
namespace Slic3r { namespace GUI {
|
||||||
@@ -282,14 +283,14 @@ wxBoxSizer *SyncAmsInfoDialog::create_sizer_thumbnail(wxButton *image_button, bo
|
|||||||
if (left) {
|
if (left) {
|
||||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto sync_text = new Label(image_button->GetParent(), _CTX(L_CONTEXT("Original", "Sync_AMS"), "Sync_AMS"));
|
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);
|
text_sizer->Add(sync_text, 0, wxALIGN_CENTER | wxALL, 0);
|
||||||
sizer_thumbnail->Add(sync_text, FromDIP(0), wxALIGN_CENTER | wxALL, FromDIP(4));
|
sizer_thumbnail->Add(sync_text, FromDIP(0), wxALIGN_CENTER | wxALL, FromDIP(4));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *text_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_after_map_text = new Label(image_button->GetParent(), _L("After mapping"));
|
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);
|
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));
|
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
|
// font
|
||||||
SetFont(wxGetApp().normal_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();
|
Freeze();
|
||||||
SetBackgroundColour(m_colour_def_color);
|
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_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);
|
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);
|
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);
|
sizer_advanced_options_title = new wxBoxSizer(wxHORIZONTAL);
|
||||||
auto advanced_options_title = new Label(m_scrolledWindow, _L("Advanced Options"));
|
auto advanced_options_title = new Label(m_scrolledWindow, _L("Advanced Options"));
|
||||||
advanced_options_title->SetFont(::Label::Body_13);
|
advanced_options_title->SetFont(::Label::Head_14); // ORCA
|
||||||
advanced_options_title->SetForegroundColour(wxColour(38, 46, 48));
|
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(0, 0, 1, wxEXPAND, 0);
|
||||||
sizer_advanced_options_title->Add(advanced_options_title, 0, wxALIGN_CENTER, 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
|
{//new content//tip confirm ok button
|
||||||
wxBoxSizer *tip_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *tip_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_attention_text = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Tip") + ": ");
|
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));
|
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_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_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 = new Label(m_scrolledWindow, m_tip_attention_color_map, LB_AUTO_WRAP);
|
||||||
m_tip_text->SetMinSize(wxSize(SyncAttentionTipWidth, -1));
|
m_tip_text->SetMinSize(wxSize(SyncAttentionTipWidth, -1));
|
||||||
m_tip_text->SetMaxSize(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->Add(m_tip_text, 0, wxALIGN_LEFT | wxTOP, FromDIP(2));
|
||||||
tip_sizer->AddSpacer(FromDIP(20));
|
tip_sizer->AddSpacer(FromDIP(20));
|
||||||
bSizer->Add(tip_sizer, 0, wxEXPAND | wxLEFT, FromDIP(25));
|
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_advace_setting_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_more_setting_tips = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Advanced settings"));
|
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_more_setting_tips->Bind(wxEVT_LEFT_DOWN, [this](wxMouseEvent &e) {
|
||||||
m_expand_more_settings = !m_expand_more_settings;
|
m_expand_more_settings = !m_expand_more_settings;
|
||||||
update_more_setting(true,true);
|
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));
|
m_append_color_sizer->Add(m_append_color_checkbox, 0, wxALIGN_LEFT | wxTOP, FromDIP(4));
|
||||||
const int gap_between_checebox_and_text = 2;
|
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 = 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_text->Hide();
|
||||||
m_append_color_sizer->AddSpacer(FromDIP(gap_between_checebox_and_text));
|
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));
|
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 = 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_text->Hide();
|
||||||
m_merge_color_sizer->AddSpacer(FromDIP(gap_between_checebox_and_text));
|
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));
|
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_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_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 = 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->SetMinSize(wxSize(SyncLabelWidth, -1));
|
||||||
m_confirm_title->SetMaxSize(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 = 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);
|
//m_are_you_sure_title->SetFont(Label::Head_14);
|
||||||
confirm_boxsizer->Add(m_are_you_sure_title, 0, wxALIGN_LEFT | wxTOP, FromDIP(0));
|
confirm_boxsizer->Add(m_are_you_sure_title, 0, wxALIGN_LEFT | wxTOP, FromDIP(0));
|
||||||
bSizer->Add(confirm_boxsizer, 0, wxALIGN_LEFT | wxLEFT , FromDIP(25));
|
bSizer->Add(confirm_boxsizer, 0, wxALIGN_LEFT | wxLEFT , FromDIP(25));
|
||||||
|
|
||||||
wxBoxSizer *warning_sizer = new wxBoxSizer(wxHORIZONTAL);
|
wxBoxSizer *warning_sizer = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_warning_text = new wxStaticText(m_scrolledWindow, wxID_ANY, _L("Error") + ":");
|
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();
|
m_warning_text->Hide();
|
||||||
warning_sizer->Add(m_warning_text, 0, wxALIGN_CENTER | wxTOP, FromDIP(2));
|
warning_sizer->Add(m_warning_text, 0, wxALIGN_CENTER | wxTOP, FromDIP(2));
|
||||||
bSizer->Add(warning_sizer, 0, wxEXPAND | wxLEFT, FromDIP(25));
|
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_scrolledWindow->SetSizerAndFit(m_sizer_main);
|
||||||
m_sizer_show_page->Add(m_scrolledWindow, 1, wxEXPAND, 0);
|
m_sizer_show_page->Add(m_scrolledWindow, 1, wxEXPAND, 0);
|
||||||
|
|
||||||
wxBoxSizer *bSizer_button = new wxBoxSizer(wxHORIZONTAL);
|
auto* dlg_btns = new DialogButtons(m_show_page, {"OK", "Cancel"});
|
||||||
bSizer_button->SetMinSize(wxSize(FromDIP(100), -1));
|
m_button_ok = dlg_btns->GetOK();
|
||||||
/* m_checkbox = new wxCheckBox(this, wxID_ANY, _L("Don't show again"), wxDefaultPosition, wxDefaultSize, 0);
|
m_button_ok->SetLabel(_L("Synchronize now"));
|
||||||
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));
|
|
||||||
|
|
||||||
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
m_button_ok->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
||||||
deal_ok();
|
deal_ok();
|
||||||
EndModal(wxID_YES);
|
EndModal(wxID_YES);
|
||||||
SetFocusIgnoringChildren();
|
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),
|
m_button_cancel = dlg_btns->GetCANCEL();
|
||||||
std::pair<wxColour, int>(*wxWHITE, StateColor::Normal));
|
m_button_cancel->SetLabel(m_input_info.cancel_text_to_later ? _L("Later") : _L("Cancel"));
|
||||||
|
|
||||||
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->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
m_button_cancel->Bind(wxEVT_COMMAND_BUTTON_CLICKED, [this](wxCommandEvent &e) {
|
||||||
EndModal(wxID_CANCEL);
|
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);
|
m_show_page->SetSizer(m_sizer_show_page);
|
||||||
}
|
}
|
||||||
show_print_failed_info(false);
|
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_left_button->msw_rescale();
|
||||||
m_swipe_right_button->msw_rescale();
|
m_swipe_right_button->msw_rescale();
|
||||||
m_button_ok->SetMinSize(OK_BUTTON_SIZE);
|
//m_button_ok->SetMinSize(OK_BUTTON_SIZE); // ORCA DialogButtons automatically manages style and size
|
||||||
m_button_ok->SetCornerRadius(FromDIP(12));
|
//m_button_ok->SetCornerRadius(FromDIP(12));
|
||||||
m_button_cancel->SetMinSize(CANCEL_BUTTON_SIZE);
|
//m_button_cancel->SetMinSize(CANCEL_BUTTON_SIZE);
|
||||||
m_button_cancel->SetCornerRadius(FromDIP(12));
|
//m_button_cancel->SetCornerRadius(FromDIP(12));
|
||||||
m_merge_color_checkbox->Rescale();
|
m_merge_color_checkbox->Rescale();
|
||||||
m_append_color_checkbox->Rescale();
|
m_append_color_checkbox->Rescale();
|
||||||
m_combobox_plate->Rescale();
|
m_combobox_plate->Rescale();
|
||||||
@@ -2628,14 +2608,14 @@ void SyncAmsInfoDialog::reset_and_sync_ams_list()
|
|||||||
is_first_row = false;
|
is_first_row = false;
|
||||||
if (!m_original_in_colormap) {
|
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 = 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);
|
m_original_in_colormap->SetFont(::Label::Head_12);
|
||||||
}
|
}
|
||||||
ams_tip_sizer->Add(m_original_in_colormap, 0, wxALIGN_LEFT | wxTOP, FromDIP(6));
|
ams_tip_sizer->Add(m_original_in_colormap, 0, wxALIGN_LEFT | wxTOP, FromDIP(6));
|
||||||
|
|
||||||
if (!m_ams_or_ext_text_in_colormap) {
|
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 = 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);
|
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));
|
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;
|
is_first_row = false;
|
||||||
if (!m_original_in_override) {
|
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 = 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);
|
m_original_in_override->SetFont(::Label::Head_12);
|
||||||
}
|
}
|
||||||
ams_tip_sizer->Add(m_original_in_override, 0, wxALIGN_LEFT | wxTOP, FromDIP(6));
|
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) {
|
if (!m_ams_or_ext_text_in_override) {
|
||||||
auto text = (m_only_exist_ext_spool_flag ? _L("Ext spool") : _L("AMS")) + ":";
|
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 = 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);
|
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));
|
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,
|
wxGetApp().preset_bundle->get_printer_extruder_count() == 1 ? 370 :320,
|
||||||
input_info.dialog_pos,
|
input_info.dialog_pos,
|
||||||
90,
|
90,
|
||||||
|
(
|
||||||
wxGetApp().preset_bundle->get_printer_extruder_count() == 1 ? _L("Successfully synchronized nozzle information.") :
|
wxGetApp().preset_bundle->get_printer_extruder_count() == 1 ? _L("Successfully synchronized nozzle information.") :
|
||||||
_L("Successfully synchronized nozzle and AMS number information."),
|
_L("Successfully synchronized nozzle and AMS number information.")
|
||||||
_L("Continue to sync filaments"),
|
) + "\n\n" + _L("Do you want to continue to sync filaments?"),
|
||||||
_CTX(L_CONTEXT("Cancel", "Sync_Nozzle_AMS"), "Sync_Nozzle_AMS"),
|
_L("Yes"), // ORCA use shorter text for buttons
|
||||||
|
_CTX(L_CONTEXT(_L("No"), "Sync_Nozzle_AMS"), "Sync_Nozzle_AMS"),
|
||||||
DisappearanceMode::TimedDisappearance)
|
DisappearanceMode::TimedDisappearance)
|
||||||
, m_input_info(input_info)
|
, 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", "quality_settings_ironing#angle-offset");
|
||||||
optgroup->append_single_option_line("ironing_angle_fixed", "quality_settings_ironing#fixed-angle");
|
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_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_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");
|
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));
|
type_box->Add(m_rbType, 0, wxALL | wxEXPAND, FromDIP(4));
|
||||||
v_sizer->Add(type_box, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
v_sizer->Add(type_box, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
||||||
|
|
||||||
// Pattern selection
|
// Settings
|
||||||
auto labeled_box_pattern = new LabeledStaticBox(this, _L("Top Surface Pattern"));
|
auto stb = new LabeledStaticBox(this, _L("Settings"));
|
||||||
auto pattern_box = new wxStaticBoxSizer(labeled_box_pattern, wxVERTICAL);
|
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
|
// 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());
|
boost::filesystem::path image_path(Slic3r::resources_dir());
|
||||||
image_path /= "images";
|
image_path /= "images";
|
||||||
@@ -1497,9 +1509,13 @@ FlowRateCalibrationDialog::FlowRateCalibrationDialog(wxWindow* parent, wxWindowI
|
|||||||
m_rbPattern->SetSelection(0); // Default to Archimedean Chords
|
m_rbPattern->SetSelection(0); // Default to Archimedean Chords
|
||||||
// ORCA: explicit set value to ensure display on Windows
|
// ORCA: explicit set value to ensure display on Windows
|
||||||
m_rbPattern->SetValue(m_rbPattern->GetString(0));
|
m_rbPattern->SetValue(m_rbPattern->GetString(0));
|
||||||
|
m_rbPattern->GetDropDown().SetUseContentWidth(true);
|
||||||
|
|
||||||
pattern_box->Add(m_rbPattern, 0, wxALL | wxEXPAND, FromDIP(4));
|
pattern_sizer->Add(pattern_text, 0, wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(2));
|
||||||
v_sizer->Add(pattern_box, 0, wxTOP | wxRIGHT | wxLEFT | wxEXPAND, FromDIP(10));
|
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));
|
v_sizer->AddSpacer(FromDIP(5));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user