aboutsummaryrefslogtreecommitdiff
path: root/demos/input_method/main.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-10-31 22:53:11 +0800
committercrupest <crupest@outlook.com>2021-10-31 22:53:11 +0800
commit1dca2841da6f024f613d6dc16de456d5035f8fce (patch)
tree37ca6290afbe5900df2eb4a09e30024257d55316 /demos/input_method/main.cpp
parente68e0d9a5130e8bc0b634572b7fd44b9bfc0f8ef (diff)
downloadcru-1dca2841da6f024f613d6dc16de456d5035f8fce.tar.gz
cru-1dca2841da6f024f613d6dc16de456d5035f8fce.tar.bz2
cru-1dca2841da6f024f613d6dc16de456d5035f8fce.zip
...
Diffstat (limited to 'demos/input_method/main.cpp')
-rw-r--r--demos/input_method/main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/input_method/main.cpp b/demos/input_method/main.cpp
index 67743239..913f0ae2 100644
--- a/demos/input_method/main.cpp
+++ b/demos/input_method/main.cpp
@@ -94,9 +94,10 @@ int main() {
const auto cursor_lefttop =
text_layout->TextSinglePoint(cursor_pos, false);
- painter->FillRectangle(Rect{cursor_lefttop.x, cursor_lefttop.y + anchor_y,
- 3, font->GetFontSize()},
- brush.get());
+ painter->FillRectangle(
+ Rect{cursor_lefttop.left, cursor_lefttop.top + anchor_y, 3,
+ cursor_lefttop.height},
+ brush.get());
}
});