Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_sinking_objects_collision

This commit is contained in:
enricoturri1966 2021-10-04 14:08:26 +02:00
commit 8226150707

View file

@ -497,14 +497,19 @@ void ObjectManipulation::update_ui_from_settings()
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));
#ifdef _WIN32
if (m_use_colors)
if (m_use_colors) {
editor->SetBackgroundColour(wxColour(axes_color_back[axis_id]));
else
if (wxGetApp().dark_mode())
editor->SetForegroundColour(*wxBLACK);
}
else {
#ifdef _WIN32
wxGetApp().UpdateDarkUI(editor);
#else
editor->SetBackgroundColour(m_use_colors ? wxColour(axes_color_back[axis_id]) : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
editor->SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOW));
editor->SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
#endif /* _WIN32 */
}
editor->Refresh();
if (++axis_id == 3)
axis_id = 0;
@ -1014,10 +1019,10 @@ void ObjectManipulation::sys_color_changed()
get_og()->sys_color_changed();
wxGetApp().UpdateDarkUI(m_word_local_combo);
wxGetApp().UpdateDarkUI(m_check_inch);
#endif
for (ManipulationEditor* editor : m_editors)
editor->sys_color_changed(this);
#endif
// btn...->msw_rescale() updates icon on button, so use it
m_mirror_bitmap_on.msw_rescale();
m_mirror_bitmap_off.msw_rescale();
@ -1050,6 +1055,7 @@ ManipulationEditor::ManipulationEditor(ObjectManipulation* parent,
#endif // __WXOSX__
if (parent->use_colors()) {
this->SetBackgroundColour(wxColour(axes_color_back[axis]));
this->SetForegroundColour(*wxBLACK);
} else {
wxGetApp().UpdateDarkUI(this);
}
@ -1102,10 +1108,14 @@ void ManipulationEditor::msw_rescale()
void ManipulationEditor::sys_color_changed(ObjectManipulation* parent)
{
if (!parent->use_colors())
wxGetApp().UpdateDarkUI(this);
else
if (parent->use_colors())
SetForegroundColour(*wxBLACK);
else
#ifdef _WIN32
wxGetApp().UpdateDarkUI(this);
#else
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
#endif // _WIN32
}
double ManipulationEditor::get_value()