From 3b541a9a4c0423178d68a1c34ab85efa9d97fc3b Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 11 Sep 2023 11:55:37 +0200 Subject: Add font specific scale config --- src/Entry.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Entry.cpp') diff --git a/src/Entry.cpp b/src/Entry.cpp index 7e664c3..5416724 100644 --- a/src/Entry.cpp +++ b/src/Entry.cpp @@ -13,8 +13,8 @@ namespace QuickMedia { return (int)v; } - static const float background_margin_horizontal = 5.0f + floor(get_config().input.font_size * get_config().scale * get_config().font_scale * 0.6f); - static const float background_margin_vertical = 2.0f + floor(get_config().input.font_size * get_config().scale * get_config().font_scale * 0.25f); + static const float background_margin_horizontal = 5.0f + floor(get_config().input.font_size * get_config().scale * 0.6f); + static const float background_margin_vertical = 2.0f + floor(get_config().input.font_size * get_config().scale * 0.25f); Entry::Entry(const std::string &placeholder_text, mgl::Shader *rounded_rectangle_shader) : on_submit_callback(nullptr), @@ -22,7 +22,7 @@ namespace QuickMedia { text("", false, floor(get_config().input.font_size * get_config().scale * get_config().font_scale), 0.0f), width(0.0f), background(mgl::vec2f(1.0f, 1.0f), 10.0f * get_config().scale, get_theme().shade_color, rounded_rectangle_shader), - placeholder(placeholder_text, *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().input.font_size * get_config().scale * get_config().font_scale)), + placeholder(placeholder_text, *FontLoader::get_font(FontLoader::FontType::LATIN, get_config().input.font_size * get_config().scale * get_config().font_scale * get_config().font.scale.latin)), mouse_left_inside(false) { text.setEditable(true); -- cgit v1.2.3