8dab4009f65e55f0b3d87ec1b222bbdd4d5809eb

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

Message

Minor cleanup

Diff

 1diff --git a/src/TabGroup.cpp b/src/TabGroup.cpp
 2index 64a7b63246a1a57f7c2f84e56beb1c31173dc9c1..e3f2dc096a5eaf3cfb062711d3005f0dd8617565 100644
 3--- a/src/TabGroup.cpp
 4+++ b/src/TabGroup.cpp
 5@@ -390,14 +390,15 @@ void Hy3TabGroup::renderTabBar() {
 6 	auto fade_opacity = this->bar.fade_opacity.fl() * (workspace == nullptr ? 1.0 : workspace->m_fAlpha.fl());
 7 
 8 	auto render_entry = [&](Hy3TabBarEntry& entry) {
 9-		Vector2D entry_size = { (entry.width.fl() * size.x) - *padding, size.y };
10+		Vector2D entry_pos = { (pos.x + (entry.offset.fl() * size.x) + (*padding * 0.5)) * scale, scaled_pos.y };
11+		Vector2D entry_size = { ((entry.width.fl() * size.x) - *padding) * scale, scaled_size.y };
12 		if (entry_size.x < 0 || entry_size.y < 0 || fade_opacity == 0.0) return;
13 
14 		wlr_box box = {
15-			(pos.x + (entry.offset.fl() * size.x) + (*padding * 0.5)) * scale,
16-			scaled_pos.y,
17-			entry_size.x * scale,
18-			scaled_size.y,
19+			entry_pos.x,
20+			entry_pos.y,
21+			entry_size.x,
22+			entry_size.y,
23 		};
24 
25 		entry.prepareTexture(scale, box);