diff options
author | crupest <crupest@outlook.com> | 2020-12-03 22:48:12 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-03 22:48:12 +0800 |
commit | 51cc89106193cc4695507d678adab7388d940577 (patch) | |
tree | f06f6bed5ac5de329a14e7ee5ffd28fb447389a8 /src/ui/controls | |
parent | b29fb11be2f043a3438a50d8942b4ad7d2af0034 (diff) | |
download | cru-51cc89106193cc4695507d678adab7388d940577.tar.gz cru-51cc89106193cc4695507d678adab7388d940577.tar.bz2 cru-51cc89106193cc4695507d678adab7388d940577.zip |
...
Diffstat (limited to 'src/ui/controls')
-rw-r--r-- | src/ui/controls/TextBox.cpp | 1 | ||||
-rw-r--r-- | src/ui/controls/TextControlService.hpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/controls/TextBox.cpp b/src/ui/controls/TextBox.cpp index 031894c0..0d14dbcf 100644 --- a/src/ui/controls/TextBox.cpp +++ b/src/ui/controls/TextBox.cpp @@ -32,7 +32,6 @@ TextBox::TextBox() service_ = std::make_unique<TextControlService<TextBox>>(this); service_->SetEnabled(true); - service_->SetCaretVisible(true); service_->SetEditable(true); border_render_object_->SetBorderEnabled(true); diff --git a/src/ui/controls/TextControlService.hpp b/src/ui/controls/TextControlService.hpp index d50621ea..c535512f 100644 --- a/src/ui/controls/TextControlService.hpp +++ b/src/ui/controls/TextControlService.hpp @@ -473,6 +473,7 @@ class TextControlService : public Object { input_method_context_event_guard_ += window_host->AfterLayoutEvent()->AddHandler( [this](auto) { this->UpdateInputMethodPosition(); }); + SetCaretVisible(true); } } @@ -483,6 +484,7 @@ class TextControlService : public Object { if (input_method_context) { input_method_context->DisableIME(); } + SetCaretVisible(false); SyncTextRenderObject(); } |