MSW-specific: FirmwareDialog: Fixed color of the text when firmware flashing is done
+ Deleted some commented code
This commit is contained in:
parent
3aad2a9f4a
commit
7d6d98cd0f
@ -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());
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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];
|
||||
|
@ -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;
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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())
|
||||
|
@ -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());
|
||||
|
@ -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);
|
||||
|
@ -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());
|
||||
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user