From 84d2b560e099eba5f9730397065aefe78a56d978 Mon Sep 17 00:00:00 2001 From: outfoxxed Date: Sun, 28 May 2023 16:44:32 -0700 Subject: [PATCH] Fix tab bars being drawn at the wrong scale --- src/TabGroup.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp index f6165d4..077623d 100644 --- a/src/TabGroup.cpp +++ b/src/TabGroup.cpp @@ -301,12 +301,13 @@ void Hy3TabGroup::renderTabBar() { } auto render_entry = [&](Hy3TabBarEntry& entry) { - entry.prepareTexture(scale, size); + Vector2D entry_size = { (entry.width.fl() * size.x) - *padding, size.y }; + entry.prepareTexture(scale, entry_size); wlr_box box = { (pos.x + (entry.offset.fl() * size.x) + (*padding * 0.5)) * scale, scaled_pos.y, - ((entry.width.fl() * size.x) - *padding) * scale, + entry_size.x * scale, scaled_size.y, };