diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-03-05 07:45:14 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-03-05 07:45:14 +0100 |
commit | 0a64acc3d68fecf5e7f23c6b0a013272f9288af8 (patch) | |
tree | c9390c71fdd827ed945610bf884f69eb236d9879 /src/Tabs.cpp | |
parent | 63d18f733602f9b7381a03b72a17662a99c44fc2 (diff) |
Make ui behavior nicer with spacing_scale less than 1.0
Diffstat (limited to 'src/Tabs.cpp')
-rw-r--r-- | src/Tabs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); } |