Fix tab bars being drawn at the wrong scale

This commit is contained in:
outfoxxed 2023-05-28 16:44:32 -07:00
parent e717c00603
commit 84d2b560e0
No known key found for this signature in database
GPG key ID: 4C88A185FB89301E

View file

@ -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,
};