ENH:use high contrast icons in dark mode

fixed STUDIO-2033

Change-Id: Ibfbc40b02f5333d80d2875d88bb3029109256e4a
This commit is contained in:
tao wang 2023-03-16 15:54:35 +08:00 committed by Lane.Wei
parent c6e49af3fe
commit ccfc61492b
3 changed files with 15 additions and 3 deletions

View file

@ -10783,6 +10783,7 @@ void Plater::sys_color_changed()
p->preview->sys_color_changed(); p->preview->sys_color_changed();
p->sidebar->sys_color_changed(); p->sidebar->sys_color_changed();
p->menus.sys_color_changed(); p->menus.sys_color_changed();
if (p->m_select_machine_dlg) p->m_select_machine_dlg->sys_color_changed();
Layout(); Layout();
GetParent()->Layout(); GetParent()->Layout();

View file

@ -3208,6 +3208,17 @@ void SelectMachineDialog::set_default()
m_stext_weight->SetLabel(weight); m_stext_weight->SetLabel(weight);
} }
void SelectMachineDialog::sys_color_changed()
{
if (wxGetApp(). dark_mode()) {
m_rename_button->SetIcon("ams_editable_light");
}
else {
m_rename_button->SetIcon("ams_editable");
}
m_rename_button->Refresh();
}
bool SelectMachineDialog::Show(bool show) bool SelectMachineDialog::Show(bool show)
{ {
show_status(PrintDialogStatus::PrintStatusInit); show_status(PrintDialogStatus::PrintStatusInit);

View file

@ -381,8 +381,8 @@ public:
PrintDialogStatus get_status() { return m_print_status; } PrintDialogStatus get_status() { return m_print_status; }
bool is_same_printer_model(); bool is_same_printer_model();
void sys_color_changed();
bool Show(bool show); bool Show(bool show);
/* model */ /* model */
wxObjectDataPtr<MachineListModel> machine_model; wxObjectDataPtr<MachineListModel> machine_model;
@ -431,7 +431,7 @@ protected:
void on_set_finish_mapping(wxCommandEvent &evt); void on_set_finish_mapping(wxCommandEvent &evt);
void on_print_job_cancel(wxCommandEvent &evt); void on_print_job_cancel(wxCommandEvent &evt);
void set_default(); void set_default();
void on_timer(wxTimerEvent &event); void on_timer(wxTimerEvent& event);
void on_selection_changed(wxCommandEvent &event); void on_selection_changed(wxCommandEvent &event);
void Enable_Refresh_Button(bool en); void Enable_Refresh_Button(bool en);
void Enable_Send_Button(bool en); void Enable_Send_Button(bool en);