TextInput: Implemented SysColorsChanged function

This commit is contained in:
YuSanka 2024-01-15 10:39:33 +01:00 committed by David Kocik
parent 1fdfbf3921
commit e4e19f1358
2 changed files with 12 additions and 0 deletions

View File

@ -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;

View File

@ -71,6 +71,8 @@ public:
void SetSelection(long from, long to);
void SysColorsChanged();
protected:
virtual void OnEdit() {}