84d2b560e099eba5f9730397065aefe78a56d978

Author
outfoxxed <outfoxxed@outfoxxed.me>
Committer
outfoxxed <outfoxxed@outfoxxed.me>
Date

Message

Fix tab bars being drawn at the wrong scale

Diff

 1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
 2index f6165d4e7c476786a1756127e10387eb68bde0fa..077623da71aa966e2e07042f8243f0b6b2b9dc58 100644
 3--- a/src/TabGroup.cpp
 4+++ b/src/TabGroup.cpp
 5@@ -301,12 +301,13 @@ void Hy3TabGroup::renderTabBar() {
 6 	}
 7 
 8 	auto render_entry = [&](Hy3TabBarEntry& entry) {
 9-		entry.prepareTexture(scale, size);
10+		Vector2D entry_size = { (entry.width.fl() * size.x) - *padding, size.y };
11+		entry.prepareTexture(scale, entry_size);
12 
13 		wlr_box box = {
14 			(pos.x + (entry.offset.fl() * size.x) + (*padding * 0.5)) * scale,
15 			scaled_pos.y,
16-			((entry.width.fl() * size.x) - *padding) * scale,
17+			entry_size.x * scale,
18 			scaled_size.y,
19 		};
20