diff --git a/resources/icons/check_off.svg b/resources/icons/check_off.svg
new file mode 100644
index 0000000000..f28cba5ea4
--- /dev/null
+++ b/resources/icons/check_off.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/check_off_disabled.svg b/resources/icons/check_off_disabled.svg
new file mode 100644
index 0000000000..492a88ea83
--- /dev/null
+++ b/resources/icons/check_off_disabled.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/check_off_focused.svg b/resources/icons/check_off_focused.svg
new file mode 100644
index 0000000000..3fb1ab9bc2
--- /dev/null
+++ b/resources/icons/check_off_focused.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/check_on.svg b/resources/icons/check_on.svg
new file mode 100644
index 0000000000..62c23441a9
--- /dev/null
+++ b/resources/icons/check_on.svg
@@ -0,0 +1,4 @@
+
diff --git a/resources/icons/check_on_disabled.svg b/resources/icons/check_on_disabled.svg
new file mode 100644
index 0000000000..2c00ecfa59
--- /dev/null
+++ b/resources/icons/check_on_disabled.svg
@@ -0,0 +1,4 @@
+
diff --git a/resources/icons/check_on_focused.svg b/resources/icons/check_on_focused.svg
new file mode 100644
index 0000000000..6b4e7935e1
--- /dev/null
+++ b/resources/icons/check_on_focused.svg
@@ -0,0 +1,4 @@
+
diff --git a/resources/icons/checked.svg b/resources/icons/checked.svg
new file mode 100644
index 0000000000..88747cb95d
--- /dev/null
+++ b/resources/icons/checked.svg
@@ -0,0 +1,4 @@
+
diff --git a/resources/icons/drop_down.svg b/resources/icons/drop_down.svg
new file mode 100644
index 0000000000..1276e34039
--- /dev/null
+++ b/resources/icons/drop_down.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/spin_dec.svg b/resources/icons/spin_dec.svg
new file mode 100644
index 0000000000..889ad9ce23
--- /dev/null
+++ b/resources/icons/spin_dec.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/spin_dec_act.svg b/resources/icons/spin_dec_act.svg
new file mode 100644
index 0000000000..a9924d8235
--- /dev/null
+++ b/resources/icons/spin_dec_act.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/spin_inc.svg b/resources/icons/spin_inc.svg
new file mode 100644
index 0000000000..cf6b3a6998
--- /dev/null
+++ b/resources/icons/spin_inc.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/spin_inc_act.svg b/resources/icons/spin_inc_act.svg
new file mode 100644
index 0000000000..e052bb7644
--- /dev/null
+++ b/resources/icons/spin_inc_act.svg
@@ -0,0 +1,3 @@
+
diff --git a/resources/icons/toggle_off.svg b/resources/icons/toggle_off.svg
new file mode 100644
index 0000000000..4a7925a155
--- /dev/null
+++ b/resources/icons/toggle_off.svg
@@ -0,0 +1,5 @@
+
diff --git a/resources/icons/toggle_on.svg b/resources/icons/toggle_on.svg
new file mode 100644
index 0000000000..caae9478be
--- /dev/null
+++ b/resources/icons/toggle_on.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp
index 426cc53309..4bf4b4a2cd 100644
--- a/src/libslic3r/AppConfig.cpp
+++ b/src/libslic3r/AppConfig.cpp
@@ -104,6 +104,9 @@ void AppConfig::set_defaults()
if (get("tabs_as_menu").empty())
set("tabs_as_menu", "0");
+
+ if (get("suppress_round_corners").empty())
+ set("suppress_round_corners", "1");
#endif // _WIN32
// remove old 'use_legacy_opengl' parameter from this config, if present
diff --git a/src/slic3r/CMakeLists.txt b/src/slic3r/CMakeLists.txt
index 8f9900bbf2..5eee8dd7e4 100644
--- a/src/slic3r/CMakeLists.txt
+++ b/src/slic3r/CMakeLists.txt
@@ -256,6 +256,29 @@ set(SLIC3R_GUI_SOURCES
GUI/DesktopIntegrationDialog.hpp
GUI/HintNotification.cpp
GUI/HintNotification.hpp
+ GUI/Widgets/BitmapToggleButton.cpp
+ GUI/Widgets/BitmapToggleButton.hpp
+ GUI/Widgets/Button.cpp
+ GUI/Widgets/Button.hpp
+ GUI/Widgets/CheckBox.cpp
+ GUI/Widgets/CheckBox.hpp
+ GUI/Widgets/ComboBox.cpp
+ GUI/Widgets/ComboBox.hpp
+ GUI/Widgets/DropDown.cpp
+ GUI/Widgets/DropDown.hpp
+ GUI/Widgets/StateColor.cpp
+ GUI/Widgets/StateColor.hpp
+ GUI/Widgets/StateHandler.cpp
+ GUI/Widgets/StateHandler.hpp
+ GUI/Widgets/StaticBox.cpp
+ GUI/Widgets/StaticBox.hpp
+ GUI/Widgets/SpinInput.cpp
+ GUI/Widgets/SpinInput.hpp
+ GUI/Widgets/SwitchButton.cpp
+ GUI/Widgets/SwitchButton.hpp
+ GUI/Widgets/TextInput.cpp
+ GUI/Widgets/TextInput.hpp
+ GUI/Widgets/UIColors.hpp
GUI/FileArchiveDialog.cpp
GUI/FileArchiveDialog.hpp
GUI/Downloader.cpp
diff --git a/src/slic3r/GUI/AboutDialog.cpp b/src/slic3r/GUI/AboutDialog.cpp
index 0f69b3ad51..1da5faf2b6 100644
--- a/src/slic3r/GUI/AboutDialog.cpp
+++ b/src/slic3r/GUI/AboutDialog.cpp
@@ -70,7 +70,7 @@ CopyrightsDialog::CopyrightsDialog()
m_html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition,
wxSize(40 * em_unit(), 20 * em_unit()), wxHW_SCROLLBAR_AUTO);
- wxFont font = get_default_font(this);
+ wxFont font = this->GetFont();// get_default_font(this);
const int fs = font.GetPointSize();
const int fs2 = static_cast(1.2f*fs);
int size[] = { fs, fs, fs, fs, fs2, fs2, fs2 };
@@ -83,6 +83,7 @@ CopyrightsDialog::CopyrightsDialog()
m_html->Bind(wxEVT_HTML_LINK_CLICKED, &CopyrightsDialog::onLinkClicked, this);
wxStdDialogButtonSizer* buttons = this->CreateStdDialogButtonSizer(wxCLOSE);
+ wxGetApp().SetWindowVariantForButton(buttons->GetCancelButton());
wxGetApp().UpdateDlgDarkUI(this, true);
this->SetEscapeId(wxID_CLOSE);
this->Bind(wxEVT_BUTTON, &CopyrightsDialog::onCloseDialog, this, wxID_CLOSE);
@@ -244,7 +245,7 @@ AboutDialog::AboutDialog()
wxStaticText* title = new wxStaticText(this, wxID_ANY, wxGetApp().is_editor() ? SLIC3R_APP_NAME : GCODEVIEWER_APP_NAME, wxDefaultPosition, wxDefaultSize);
wxFont title_font = GUI::wxGetApp().bold_font();
title_font.SetFamily(wxFONTFAMILY_ROMAN);
- title_font.SetPointSize(24);
+ title_font.SetPointSize(int(2.5 * title_font.GetPointSize()));//title_font.SetPointSize(24);
title->SetFont(title_font);
vsizer->Add(title, 0, wxALIGN_LEFT | wxTOP, 10);
}
@@ -267,7 +268,7 @@ AboutDialog::AboutDialog()
m_html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO/*NEVER*/);
{
m_html->SetMinSize(wxSize(-1, 16 * wxGetApp().em_unit()));
- wxFont font = get_default_font(this);
+ wxFont font = wxGetApp().normal_font();// get_default_font(this);
const auto text_clr = wxGetApp().get_label_clr_default();
const auto text_clr_str = encode_color(ColorRGB(text_clr.Red(), text_clr.Green(), text_clr.Blue()));
const auto bgr_clr_str = encode_color(ColorRGB(bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue()));
@@ -309,16 +310,19 @@ AboutDialog::AboutDialog()
wxStdDialogButtonSizer* buttons = this->CreateStdDialogButtonSizer(wxCLOSE);
+ wxGetApp().SetWindowVariantForButton(buttons->GetCancelButton());
m_copy_rights_btn_id = NewControlId();
auto copy_rights_btn = new wxButton(this, m_copy_rights_btn_id, _L("Portions copyright")+dots);
buttons->Insert(0, copy_rights_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5);
copy_rights_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyrightBtn, this);
+ wxGetApp().SetWindowVariantForButton(copy_rights_btn);
m_copy_version_btn_id = NewControlId();
auto copy_version_btn = new wxButton(this, m_copy_version_btn_id, _L("Copy Version Info"));
buttons->Insert(1, copy_version_btn, 0, wxALIGN_CENTER_VERTICAL | wxLEFT, 5);
copy_version_btn->Bind(wxEVT_BUTTON, &AboutDialog::onCopyToClipboard, this);
+ wxGetApp().SetWindowVariantForButton(copy_version_btn);
wxGetApp().UpdateDlgDarkUI(this, true);
diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp
index b7e32151cd..a8bbacf6e6 100644
--- a/src/slic3r/GUI/BedShapeDialog.cpp
+++ b/src/slic3r/GUI/BedShapeDialog.cpp
@@ -150,7 +150,10 @@ void BedShapeDialog::build_dialog(const ConfigOptionPoints& default_pt, const Co
auto main_sizer = new wxBoxSizer(wxVERTICAL);
main_sizer->Add(m_panel, 1, wxEXPAND);
- main_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM, 10);
+ wxStdDialogButtonSizer* buttons = CreateStdDialogButtonSizer(wxOK | wxCANCEL);
+ wxGetApp().SetWindowVariantForButton(buttons->GetAffirmativeButton());
+ wxGetApp().SetWindowVariantForButton(buttons->GetCancelButton());
+ main_sizer->Add(buttons, 0, wxALIGN_CENTER_HORIZONTAL | wxBOTTOM, 10);
wxGetApp().UpdateDlgDarkUI(this, true);
@@ -214,6 +217,7 @@ void BedShapePanel::build_panel(const ConfigOptionPoints& default_pt, const Conf
line.full_width = 1;
line.widget = [this](wxWindow* parent) {
wxButton* shape_btn = new wxButton(parent, wxID_ANY, _L("Load shape from STL..."));
+ wxGetApp().SetWindowVariantForButton(shape_btn);
wxSizer* shape_sizer = new wxBoxSizer(wxHORIZONTAL);
shape_sizer->Add(shape_btn, 1, wxEXPAND);
@@ -294,6 +298,7 @@ wxPanel* BedShapePanel::init_texture_panel()
line.full_width = 1;
line.widget = [this](wxWindow* parent) {
wxButton* load_btn = new wxButton(parent, wxID_ANY, _L("Load..."));
+ wxGetApp().SetWindowVariantForButton(load_btn);
wxSizer* load_sizer = new wxBoxSizer(wxHORIZONTAL);
load_sizer->Add(load_btn, 1, wxEXPAND);
@@ -303,6 +308,7 @@ wxPanel* BedShapePanel::init_texture_panel()
filename_sizer->Add(filename_lbl, 1, wxEXPAND);
wxButton* remove_btn = new wxButton(parent, wxID_ANY, _L("Remove"));
+ wxGetApp().SetWindowVariantForButton(remove_btn);
wxSizer* remove_sizer = new wxBoxSizer(wxHORIZONTAL);
remove_sizer->Add(remove_btn, 1, wxEXPAND);
@@ -365,6 +371,7 @@ wxPanel* BedShapePanel::init_model_panel()
line.full_width = 1;
line.widget = [this](wxWindow* parent) {
wxButton* load_btn = new wxButton(parent, wxID_ANY, _L("Load..."));
+ wxGetApp().SetWindowVariantForButton(load_btn);
wxSizer* load_sizer = new wxBoxSizer(wxHORIZONTAL);
load_sizer->Add(load_btn, 1, wxEXPAND);
@@ -373,6 +380,7 @@ wxPanel* BedShapePanel::init_model_panel()
filename_sizer->Add(filename_lbl, 1, wxEXPAND);
wxButton* remove_btn = new wxButton(parent, wxID_ANY, _L("Remove"));
+ wxGetApp().SetWindowVariantForButton(remove_btn);
wxSizer* remove_sizer = new wxBoxSizer(wxHORIZONTAL);
remove_sizer->Add(remove_btn, 1, wxEXPAND);
diff --git a/src/slic3r/GUI/BitmapCache.cpp b/src/slic3r/GUI/BitmapCache.cpp
index 10f7277309..98b2889aa1 100644
--- a/src/slic3r/GUI/BitmapCache.cpp
+++ b/src/slic3r/GUI/BitmapCache.cpp
@@ -414,6 +414,8 @@ wxBitmapBundle* BitmapCache::from_svg(const std::string& bitmap_name, unsigned t
if (!new_color.empty())
replaces["\"#ED6B21\""] = "\"" + new_color + "\"";
+ replaces["\"#ButtonBG\""] = dark_mode ? "\"#4E4E4E\"" : "\"#828282\"";
+
std::string str;
nsvgGetDataFromFileWithReplace(Slic3r::var(bitmap_name + ".svg").c_str(), str, replaces);
if (str.empty())
diff --git a/src/slic3r/GUI/BitmapComboBox.cpp b/src/slic3r/GUI/BitmapComboBox.cpp
index 465eb4822b..2c50ab8cf7 100644
--- a/src/slic3r/GUI/BitmapComboBox.cpp
+++ b/src/slic3r/GUI/BitmapComboBox.cpp
@@ -66,10 +66,11 @@ BitmapComboBox::BitmapComboBox(wxWindow* parent,
int n/* = 0*/,
const wxString choices[]/* = NULL*/,
long style/* = 0*/) :
- wxBitmapComboBox(parent, id, value, pos, size, n, choices, style)
+// wxBitmapComboBox(parent, id, value, pos, size, n, choices, style)
+ ::ComboBox(parent, id, value, pos, size, n, choices, style | DD_NO_CHECK_ICON)
{
SetFont(Slic3r::GUI::wxGetApp().normal_font());
-#ifdef _WIN32
+#if 0 //#ifdef _WIN32
// Workaround for ignoring CBN_EDITCHANGE events, which are processed after the content of the combo box changes, so that
// the index of the item inside CBN_EDITCHANGE may no more be valid.
EnableTextChangedEvents(false);
@@ -79,11 +80,12 @@ BitmapComboBox::BitmapComboBox(wxWindow* parent,
#endif /* _WIN32 */
}
+#if 0
BitmapComboBox::~BitmapComboBox()
{
}
-#ifdef _WIN32
+//#ifdef _WIN32
int BitmapComboBox::Append(const wxString& item)
{
diff --git a/src/slic3r/GUI/BitmapComboBox.hpp b/src/slic3r/GUI/BitmapComboBox.hpp
index 07031f6bf2..e1398ec041 100644
--- a/src/slic3r/GUI/BitmapComboBox.hpp
+++ b/src/slic3r/GUI/BitmapComboBox.hpp
@@ -8,6 +8,8 @@
#include
#include
+#include "Widgets/ComboBox.hpp"
+
#include "GUI_Utils.hpp"
// ---------------------------------
@@ -17,7 +19,8 @@ namespace Slic3r {
namespace GUI {
// BitmapComboBox used to presets list on Sidebar and Tabs
-class BitmapComboBox : public wxBitmapComboBox
+//class BitmapComboBox : public wxBitmapComboBox
+class BitmapComboBox : public ::ComboBox
{
public:
BitmapComboBox(wxWindow* parent,
@@ -28,6 +31,7 @@ BitmapComboBox(wxWindow* parent,
int n = 0,
const wxString choices[] = NULL,
long style = 0);
+#if 0
~BitmapComboBox();
#ifdef _WIN32
@@ -40,7 +44,7 @@ BitmapComboBox(wxWindow* parent,
protected:
-#ifdef _WIN32
+//#ifdef _WIN32
bool MSWOnDraw(WXDRAWITEMSTRUCT* item) override;
void DrawBackground_(wxDC& dc, const wxRect& rect, int WXUNUSED(item), int flags) const;
public:
diff --git a/src/slic3r/GUI/ButtonsDescription.cpp b/src/slic3r/GUI/ButtonsDescription.cpp
index 105dbe777d..08d1cb76c8 100644
--- a/src/slic3r/GUI/ButtonsDescription.cpp
+++ b/src/slic3r/GUI/ButtonsDescription.cpp
@@ -78,7 +78,7 @@ wxBitmapBundle * ModePaletteComboBox::get_bmp(const std::vector &pa
// Create the bitmap with color bars.
std::vector bmps;
for (const auto& color : palette) {
- bmps.emplace_back(get_bmp_bundle("mode", icon_height, color));
+ bmps.emplace_back(get_bmp_bundle("mode", icon_height, icon_height, color));
bmps.emplace_back(get_empty_bmp_bundle(wxOSX ? 5 : 6, icon_height));
}
bmp_bndl = bitmap_cache().insert_bndl(bitmap_key, bmps);
diff --git a/src/slic3r/GUI/ConfigSnapshotDialog.cpp b/src/slic3r/GUI/ConfigSnapshotDialog.cpp
index 619ed8d737..fb78b0d253 100644
--- a/src/slic3r/GUI/ConfigSnapshotDialog.cpp
+++ b/src/slic3r/GUI/ConfigSnapshotDialog.cpp
@@ -141,7 +141,7 @@ ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db
// text
html = new wxHtmlWindow(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO);
{
- wxFont font = get_default_font(this);
+ wxFont font = this->GetFont();// get_default_font(this);
#ifdef __WXMSW__
const int fs = font.GetPointSize();
const int fs1 = static_cast(0.8f*fs);
@@ -160,7 +160,8 @@ ConfigSnapshotDialog::ConfigSnapshotDialog(const Config::SnapshotDB &snapshot_db
}
wxStdDialogButtonSizer* buttons = this->CreateStdDialogButtonSizer(wxCLOSE);
- wxGetApp().UpdateDarkUI(static_cast(this->FindWindowById(wxID_CLOSE, this)));
+ wxGetApp().SetWindowVariantForButton(buttons->GetCancelButton());
+ wxGetApp().UpdateDarkUI(buttons->GetCancelButton());
this->SetEscapeId(wxID_CLOSE);
this->Bind(wxEVT_BUTTON, &ConfigSnapshotDialog::onCloseDialog, this, wxID_CLOSE);
vsizer->Add(buttons, 0, wxEXPAND | wxRIGHT | wxBOTTOM, 3);
diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp
index 741ab7be00..5c6811932e 100644
--- a/src/slic3r/GUI/ConfigWizard.cpp
+++ b/src/slic3r/GUI/ConfigWizard.cpp
@@ -423,6 +423,10 @@ PrinterPicker::PrinterPicker(wxWindow *parent, const VendorProfile &vendor, wxSt
title_sizer->Add(sel_all, 0, wxRIGHT, BTN_SPACING);
title_sizer->Add(sel_none);
+ wxGetApp().SetWindowVariantForButton(sel_all_std);
+ wxGetApp().SetWindowVariantForButton(sel_all);
+ wxGetApp().SetWindowVariantForButton(sel_none);
+
wxGetApp().UpdateDarkUI(sel_all_std);
wxGetApp().UpdateDarkUI(sel_all);
wxGetApp().UpdateDarkUI(sel_none);
@@ -748,6 +752,9 @@ PageMaterials::PageMaterials(ConfigWizard *parent, Materials *materials, wxStrin
wxGetApp().UpdateDarkUI(sel_all);
wxGetApp().UpdateDarkUI(sel_none);
+ wxGetApp().SetWindowVariantForButton(sel_all);
+ wxGetApp().SetWindowVariantForButton(sel_none);
+
grid->Add(new wxBoxSizer(wxHORIZONTAL));
grid->Add(new wxBoxSizer(wxHORIZONTAL));
grid->Add(new wxBoxSizer(wxHORIZONTAL));
@@ -861,10 +868,8 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector"
""
""
- ""
"%s
%s"
""
- ""
""
"