Fix for #7012 - Dark mode + colored axis: Can't read the Manipulation panel
This commit is contained in:
parent
39a98e97b4
commit
a5a6c0e09a
1 changed files with 19 additions and 9 deletions
|
@ -497,14 +497,19 @@ void ObjectManipulation::update_ui_from_settings()
|
||||||
int axis_id = 0;
|
int axis_id = 0;
|
||||||
for (ManipulationEditor* editor : m_editors) {
|
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]) : wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||||
#ifdef _WIN32
|
if (m_use_colors) {
|
||||||
if (m_use_colors)
|
|
||||||
editor->SetBackgroundColour(wxColour(axes_color_back[axis_id]));
|
editor->SetBackgroundColour(wxColour(axes_color_back[axis_id]));
|
||||||
else
|
if (wxGetApp().dark_mode())
|
||||||
|
editor->SetForegroundColour(*wxBLACK);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
#ifdef _WIN32
|
||||||
wxGetApp().UpdateDarkUI(editor);
|
wxGetApp().UpdateDarkUI(editor);
|
||||||
#else
|
#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 */
|
#endif /* _WIN32 */
|
||||||
|
}
|
||||||
editor->Refresh();
|
editor->Refresh();
|
||||||
if (++axis_id == 3)
|
if (++axis_id == 3)
|
||||||
axis_id = 0;
|
axis_id = 0;
|
||||||
|
@ -1009,10 +1014,10 @@ void ObjectManipulation::sys_color_changed()
|
||||||
get_og()->sys_color_changed();
|
get_og()->sys_color_changed();
|
||||||
wxGetApp().UpdateDarkUI(m_word_local_combo);
|
wxGetApp().UpdateDarkUI(m_word_local_combo);
|
||||||
wxGetApp().UpdateDarkUI(m_check_inch);
|
wxGetApp().UpdateDarkUI(m_check_inch);
|
||||||
|
#endif
|
||||||
for (ManipulationEditor* editor : m_editors)
|
for (ManipulationEditor* editor : m_editors)
|
||||||
editor->sys_color_changed(this);
|
editor->sys_color_changed(this);
|
||||||
#endif
|
|
||||||
// btn...->msw_rescale() updates icon on button, so use it
|
// btn...->msw_rescale() updates icon on button, so use it
|
||||||
m_mirror_bitmap_on.msw_rescale();
|
m_mirror_bitmap_on.msw_rescale();
|
||||||
m_mirror_bitmap_off.msw_rescale();
|
m_mirror_bitmap_off.msw_rescale();
|
||||||
|
@ -1045,6 +1050,7 @@ ManipulationEditor::ManipulationEditor(ObjectManipulation* parent,
|
||||||
#endif // __WXOSX__
|
#endif // __WXOSX__
|
||||||
if (parent->use_colors()) {
|
if (parent->use_colors()) {
|
||||||
this->SetBackgroundColour(wxColour(axes_color_back[axis]));
|
this->SetBackgroundColour(wxColour(axes_color_back[axis]));
|
||||||
|
this->SetForegroundColour(*wxBLACK);
|
||||||
} else {
|
} else {
|
||||||
wxGetApp().UpdateDarkUI(this);
|
wxGetApp().UpdateDarkUI(this);
|
||||||
}
|
}
|
||||||
|
@ -1097,10 +1103,14 @@ void ManipulationEditor::msw_rescale()
|
||||||
|
|
||||||
void ManipulationEditor::sys_color_changed(ObjectManipulation* parent)
|
void ManipulationEditor::sys_color_changed(ObjectManipulation* parent)
|
||||||
{
|
{
|
||||||
if (!parent->use_colors())
|
if (parent->use_colors())
|
||||||
wxGetApp().UpdateDarkUI(this);
|
|
||||||
else
|
|
||||||
SetForegroundColour(*wxBLACK);
|
SetForegroundColour(*wxBLACK);
|
||||||
|
else
|
||||||
|
#ifdef _WIN32
|
||||||
|
wxGetApp().UpdateDarkUI(this);
|
||||||
|
#else
|
||||||
|
SetForegroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT));
|
||||||
|
#endif // _WIN32
|
||||||
}
|
}
|
||||||
|
|
||||||
double ManipulationEditor::get_value()
|
double ManipulationEditor::get_value()
|
||||||
|
|
Loading…
Reference in a new issue