Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2022-01-05 12:23:55 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2022-01-05 12:23:55 +0300
commitba643fa5faa0d3e832425148321e47aea7e6e70a (patch)
treea6fc6a9d5adc89f583635852c12f4ffd9d4f8af5 /src/slic3r/GUI
parentffe678e0ea976f4f062662b70a5725b086cf258c (diff)
parent9bbcfb80b102447b1cb2492b3a05e47b2d7d3bb2 (diff)
Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer
Diffstat (limited to 'src/slic3r/GUI')
-rw-r--r--src/slic3r/GUI/AboutDialog.cpp4
-rw-r--r--src/slic3r/GUI/BedShapeDialog.cpp4
-rw-r--r--src/slic3r/GUI/ConfigSnapshotDialog.cpp2
-rw-r--r--src/slic3r/GUI/ConfigWizard.cpp2
-rw-r--r--src/slic3r/GUI/FirmwareDialog.cpp3
-rw-r--r--src/slic3r/GUI/GUI_ObjectManipulation.cpp2
-rw-r--r--src/slic3r/GUI/MsgDialog.cpp4
-rw-r--r--src/slic3r/GUI/OG_CustomCtrl.cpp7
-rw-r--r--src/slic3r/GUI/Plater.cpp4
-rw-r--r--src/slic3r/GUI/SysInfoDialog.cpp2
-rw-r--r--src/slic3r/GUI/UnsavedChangesDialog.cpp2
11 files changed, 13 insertions, 23 deletions
diff --git a/src/slic3r/GUI/AboutDialog.cpp b/src/slic3r/GUI/AboutDialog.cpp
index 05f301186..2b21b9ee0 100644
--- a/src/slic3r/GUI/AboutDialog.cpp
+++ b/src/slic3r/GUI/AboutDialog.cpp
@@ -132,7 +132,7 @@ wxString CopyrightsDialog::get_html_text()
{
wxColour bgr_clr = wxGetApp().get_window_default_clr();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
- const auto text_clr = wxGetApp().get_label_clr_default();// wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+ const auto text_clr = wxGetApp().get_label_clr_default();
const auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
const auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
@@ -256,7 +256,7 @@ AboutDialog::AboutDialog()
{
m_html->SetMinSize(wxSize(-1, 16 * wxGetApp().em_unit()));
wxFont font = get_default_font(this);
- const auto text_clr = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+ const auto text_clr = wxGetApp().get_label_clr_default();
auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
diff --git a/src/slic3r/GUI/BedShapeDialog.cpp b/src/slic3r/GUI/BedShapeDialog.cpp
index 246c8b63e..27caedfc3 100644
--- a/src/slic3r/GUI/BedShapeDialog.cpp
+++ b/src/slic3r/GUI/BedShapeDialog.cpp
@@ -309,7 +309,7 @@ wxPanel* BedShapePanel::init_texture_panel()
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
if (lbl != nullptr) {
bool exists = (m_custom_texture == NONE) || boost::filesystem::exists(m_custom_texture);
- lbl->SetForegroundColour(exists ? /*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/wxGetApp().get_label_clr_default() : wxColor(*wxRED));
+ lbl->SetForegroundColour(exists ? wxGetApp().get_label_clr_default() : wxColor(*wxRED));
wxString tooltip_text = "";
if (m_custom_texture != NONE) {
@@ -380,7 +380,7 @@ wxPanel* BedShapePanel::init_model_panel()
wxStaticText* lbl = dynamic_cast<wxStaticText*>(e.GetEventObject());
if (lbl != nullptr) {
bool exists = (m_custom_model == NONE) || boost::filesystem::exists(m_custom_model);
- lbl->SetForegroundColour(exists ? /*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/wxGetApp().get_label_clr_default() : wxColor(*wxRED));
+ lbl->SetForegroundColour(exists ? wxGetApp().get_label_clr_default() : wxColor(*wxRED));
wxString tooltip_text = "";
if (m_custom_model != NONE) {
diff --git a/src/slic3r/GUI/ConfigSnapshotDialog.cpp b/src/slic3r/GUI/ConfigSnapshotDialog.cpp
index 7d2029e22..afa495d0c 100644
--- a/src/slic3r/GUI/ConfigSnapshotDialog.cpp
+++ b/src/slic3r/GUI/ConfigSnapshotDialog.cpp
@@ -105,7 +105,7 @@ static wxString generate_html_page(const Config::SnapshotDB &snapshot_db, const
wxString text =
"<html>"
"<body bgcolor=\"" + get_color(wxGetApp().get_window_default_clr()/*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW)*/) + "\" cellspacing=\"2\" cellpadding=\"0\" border=\"0\" link=\"#800000\">"
- "<font color=\"" + get_color(wxGetApp().get_label_clr_default()/*wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT)*/) + "\">";
+ "<font color=\"" + get_color(wxGetApp().get_label_clr_default()) + "\">";
text += "<table style=\"width:100%\">";
for (size_t i_row = 0; i_row < snapshot_db.snapshots().size(); ++ i_row) {
const Config::Snapshot &snapshot = snapshot_db.snapshots()[snapshot_db.snapshots().size() - i_row - 1];
diff --git a/src/slic3r/GUI/ConfigWizard.cpp b/src/slic3r/GUI/ConfigWizard.cpp
index d12628130..66b27995f 100644
--- a/src/slic3r/GUI/ConfigWizard.cpp
+++ b/src/slic3r/GUI/ConfigWizard.cpp
@@ -747,7 +747,7 @@ void PageMaterials::set_compatible_printers_html_window(const std::vector<std::s
#endif
#endif
const auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
- const auto text_clr = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+ const auto text_clr = wxGetApp().get_label_clr_default();
const auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
wxString first_line = format_wxstr(_L("%1% marked with <b>*</b> are <b>not</b> compatible with some installed printers."), materials->technology == T_FFF ? _L("Filaments") : _L("SLA materials"));
wxString text;
diff --git a/src/slic3r/GUI/FirmwareDialog.cpp b/src/slic3r/GUI/FirmwareDialog.cpp
index 3d35f0380..7600ef4fa 100644
--- a/src/slic3r/GUI/FirmwareDialog.cpp
+++ b/src/slic3r/GUI/FirmwareDialog.cpp
@@ -270,13 +270,12 @@ void FirmwareDialog::priv::flashing_start(unsigned tasks)
void FirmwareDialog::priv::flashing_done(AvrDudeComplete complete)
{
- auto text_color = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
port_picker->Enable();
btn_rescan->Enable();
hex_picker->Enable();
btn_close->Enable();
btn_flash->SetLabel(btn_flash_label_ready);
- txt_status->SetForegroundColour(text_color);
+ txt_status->SetForegroundColour(GUI::wxGetApp().get_label_clr_default());
timer_pulse.Stop();
progressbar->SetValue(progressbar->GetRange());
diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
index 201e5d78d..18e58efb8 100644
--- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp
+++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp
@@ -495,7 +495,7 @@ void ObjectManipulation::update_ui_from_settings()
// update colors for edit-boxes
int axis_id = 0;
for (ManipulationEditor* editor : m_editors) {
-// editor->SetForegroundColour(m_use_colors ? wxColour(axes_color_text[axis_id]) : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
+// editor->SetForegroundColour(m_use_colors ? wxColour(axes_color_text[axis_id]) : wxGetApp().get_label_clr_default());
if (m_use_colors) {
editor->SetBackgroundColour(wxColour(axes_color_back[axis_id]));
if (wxGetApp().dark_mode())
diff --git a/src/slic3r/GUI/MsgDialog.cpp b/src/slic3r/GUI/MsgDialog.cpp
index 80a8159c0..199fdebce 100644
--- a/src/slic3r/GUI/MsgDialog.cpp
+++ b/src/slic3r/GUI/MsgDialog.cpp
@@ -136,11 +136,7 @@ static void add_msg_content(wxWindow* parent, wxBoxSizer* content_sizer, wxStrin
wxFont font = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT);
wxFont monospace = wxGetApp().code_font();
-#ifdef _WIN32
wxColour text_clr = wxGetApp().get_label_clr_default();
-#else
- wxColour text_clr = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
-#endif
wxColour bgr_clr = parent->GetBackgroundColour(); //wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW);
auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
diff --git a/src/slic3r/GUI/OG_CustomCtrl.cpp b/src/slic3r/GUI/OG_CustomCtrl.cpp
index ee19e5da5..83537fd54 100644
--- a/src/slic3r/GUI/OG_CustomCtrl.cpp
+++ b/src/slic3r/GUI/OG_CustomCtrl.cpp
@@ -699,12 +699,7 @@ wxCoord OG_CustomCtrl::CtrlLine::draw_text(wxDC& dc, wxPoint pos, const wxStr
#else
dc.SetFont(old_font.Bold().Underlined());
#endif
- dc.SetTextForeground(color ? *color :
-#ifdef _WIN32
- wxGetApp().get_label_clr_default());
-#else
- wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
-#endif /* _WIN32 */
+ dc.SetTextForeground(color ? *color : wxGetApp().get_label_clr_default());
dc.DrawText(out_text, pos);
dc.SetTextForeground(old_clr);
dc.SetFont(old_font);
diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp
index 0cea13d32..60efb3fae 100644
--- a/src/slic3r/GUI/Plater.cpp
+++ b/src/slic3r/GUI/Plater.cpp
@@ -251,9 +251,9 @@ void ObjectInfo::update_warning_icon(const std::string& warning_icon_name)
enum SlicedInfoIdx
{
+ siFilament_g,
siFilament_m,
siFilament_mm3,
- siFilament_g,
siMateril_unit,
siCost,
siEstimatedTime,
@@ -293,9 +293,9 @@ SlicedInfo::SlicedInfo(wxWindow *parent) :
info_vec.push_back(std::pair<wxStaticText*, wxStaticText*>(text, info_label));
};
+ init_info_label(_L("Used Filament (g)"));
init_info_label(_L("Used Filament (m)"));
init_info_label(_L("Used Filament (mm³)"));
- init_info_label(_L("Used Filament (g)"));
init_info_label(_L("Used Material (unit)"));
init_info_label(_L("Cost (money)"));
init_info_label(_L("Estimated printing time"));
diff --git a/src/slic3r/GUI/SysInfoDialog.cpp b/src/slic3r/GUI/SysInfoDialog.cpp
index 1a8542438..594f5fec7 100644
--- a/src/slic3r/GUI/SysInfoDialog.cpp
+++ b/src/slic3r/GUI/SysInfoDialog.cpp
@@ -113,7 +113,7 @@ SysInfoDialog::SysInfoDialog()
// main_info_text
wxFont font = get_default_font(this);
- const auto text_clr = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+ const auto text_clr = wxGetApp().get_label_clr_default();
auto text_clr_str = wxString::Format(wxT("#%02X%02X%02X"), text_clr.Red(), text_clr.Green(), text_clr.Blue());
auto bgr_clr_str = wxString::Format(wxT("#%02X%02X%02X"), bgr_clr.Red(), bgr_clr.Green(), bgr_clr.Blue());
diff --git a/src/slic3r/GUI/UnsavedChangesDialog.cpp b/src/slic3r/GUI/UnsavedChangesDialog.cpp
index 6dc194759..3afedbd68 100644
--- a/src/slic3r/GUI/UnsavedChangesDialog.cpp
+++ b/src/slic3r/GUI/UnsavedChangesDialog.cpp
@@ -57,7 +57,7 @@ static std::string get_icon_name(Preset::Type type, PrinterTechnology pt) {
static std::string def_text_color()
{
- wxColour def_colour = wxGetApp().get_label_clr_default();//wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
+ wxColour def_colour = wxGetApp().get_label_clr_default();
auto clr_str = wxString::Format(wxT("#%02X%02X%02X"), def_colour.Red(), def_colour.Green(), def_colour.Blue());
return clr_str.ToStdString();
}