From 0a64acc3d68fecf5e7f23c6b0a013272f9288af8 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sat, 5 Mar 2022 07:45:14 +0100 Subject: Make ui behavior nicer with spacing_scale less than 1.0 --- src/Tabs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Tabs.cpp') diff --git a/src/Tabs.cpp b/src/Tabs.cpp index 213e11e..095a62a 100644 --- a/src/Tabs.cpp +++ b/src/Tabs.cpp @@ -15,7 +15,7 @@ namespace QuickMedia { } static const float tab_text_size = floor(get_config().tab.font_size * get_config().scale * get_config().font_scale); - static const float tab_height = tab_text_size + floor(10.0f * get_config().scale); + static const float tab_height = tab_text_size + floor(10.0f * get_config().scale * get_config().spacing_scale); static const float tab_min_width = 250.0f; static const float tab_margin_x = floor(10.0f * get_config().spacing_scale); @@ -152,7 +152,7 @@ namespace QuickMedia { float text_pos_x = floor(pos.x + i*width_per_tab + width_per_tab*0.5f - tab_text.get_bounds().size.x*0.5f); text_pos_x = std::max(text_pos_x, background_pos_x); - window.set_view(create_scissor_view({ text_pos_x, tab_text_y }, { tab_background_width, tab_height })); + window.set_view(create_scissor_view({ text_pos_x, tab_text_y }, { tab_background_width, tab_height*2 })); window.draw(tab_text); window.set_view(prev_view); } -- cgit v1.2.3