aboutsummaryrefslogtreecommitdiff
path: root/src/Entry.cpp
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-12-02 12:28:19 +0100
committerdec05eba <dec05eba@protonmail.com>2022-12-02 12:28:19 +0100
commitc15aa4decf523b81d87925942642507fe7d02848 (patch)
tree0320be675b43a53dcc378dd3140237efc8b272cd /src/Entry.cpp
parent55287c0f48db741f93f1be122c6eb12e48ba995c (diff)
Better layout for different font scale
Diffstat (limited to 'src/Entry.cpp')
-rw-r--r--src/Entry.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Entry.cpp b/src/Entry.cpp
index 8357216..7e664c3 100644
--- a/src/Entry.cpp
+++ b/src/Entry.cpp
@@ -109,8 +109,8 @@ namespace QuickMedia {
void Entry::set_position(const mgl::vec2f &pos) {
background.set_position(pos);
- text.set_position(pos + mgl::vec2f(background_margin_horizontal * padding_scale, background_margin_vertical * padding_scale - text.get_character_size() * 0.3f).floor());
- placeholder.set_position(pos + mgl::vec2f(background_margin_horizontal * padding_scale, background_margin_vertical * padding_scale - text.get_character_size() * 0.005f).floor());
+ text.set_position(pos + mgl::vec2f(background_margin_horizontal * padding_scale, background_margin_vertical * padding_scale - (float)text.get_character_size() * 0.3f).floor());
+ placeholder.set_position(pos + mgl::vec2f(background_margin_horizontal * padding_scale, background_margin_vertical * padding_scale - (float)text.get_character_size() * 0.005f).floor());
}
void Entry::set_max_width(float width) {