aboutsummaryrefslogtreecommitdiff
path: root/src/ui/controls/text_control.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-27 22:53:54 +0800
committercrupest <crupest@outlook.com>2018-09-27 22:53:54 +0800
commiteab8d69ccac6f7b306561a49e9c1f8fda21376d2 (patch)
tree914b66de1428ddfa55a190495e7e24cbb5f8b8c2 /src/ui/controls/text_control.cpp
parent692af0a1b202f128b6871ba790c0610f036e2944 (diff)
downloadcru-eab8d69ccac6f7b306561a49e9c1f8fda21376d2.tar.gz
cru-eab8d69ccac6f7b306561a49e9c1f8fda21376d2.tar.bz2
cru-eab8d69ccac6f7b306561a49e9c1f8fda21376d2.zip
Create Border. Make text control relayout when text changed.
Diffstat (limited to 'src/ui/controls/text_control.cpp')
-rw-r--r--src/ui/controls/text_control.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ui/controls/text_control.cpp b/src/ui/controls/text_control.cpp
index 845b090a..692c4451 100644
--- a/src/ui/controls/text_control.cpp
+++ b/src/ui/controls/text_control.cpp
@@ -267,6 +267,8 @@ namespace cru::ui::controls
void TextControl::OnTextChangedCore(const String& old_text, const String& new_text)
{
RecreateTextLayout();
+ if (const auto window = GetWindow())
+ window->Relayout();
Repaint();
}