diff --git a/src/slic3r/GUI/Widgets/TextInput.cpp b/src/slic3r/GUI/Widgets/TextInput.cpp index b4f1b1a707..7044ecdfdd 100644 --- a/src/slic3r/GUI/Widgets/TextInput.cpp +++ b/src/slic3r/GUI/Widgets/TextInput.cpp @@ -142,6 +142,16 @@ void TextInput::SetSelection(long from, long to) text_ctrl->SetSelection(from, to); } +void TextInput::SysColorsChanged() +{ + if (auto parent = this->GetParent()) { + SetBackgroundColour(parent->GetBackgroundColour()); + SetForegroundColour(parent->GetForegroundColour()); + if (this->drop_down_icon.bmp().IsOk()) + this->drop_down_icon.sys_color_changed(); + } +} + void TextInput::SetIcon(const wxBitmapBundle& icon_in) { icon = icon_in; diff --git a/src/slic3r/GUI/Widgets/TextInput.hpp b/src/slic3r/GUI/Widgets/TextInput.hpp index d48cfc679b..171ab3b80f 100644 --- a/src/slic3r/GUI/Widgets/TextInput.hpp +++ b/src/slic3r/GUI/Widgets/TextInput.hpp @@ -71,6 +71,8 @@ public: void SetSelection(long from, long to); + void SysColorsChanged(); + protected: virtual void OnEdit() {}