Improvements to some logo alignment issues in the System view carousel.

This commit is contained in:
Leon Styhre 2021-11-04 21:33:28 +01:00
parent 4970fce113
commit b957cfcea6

View file

@ -608,6 +608,11 @@ void SystemView::renderCarousel(const glm::mat4& trans)
comp->setRotationOrigin(mCarousel.logoRotationOrigin);
}
comp->setScale(scale);
// Partial workaround for single-pixel alignment issues at some resolutions and with
// some logos.
comp->setSize(comp->getSize().x, std::ceil(comp->getSize().y));
comp->setPosition(comp->getPosition().x, std::round(comp->getPosition().y));
comp->setOpacity(static_cast<unsigned char>(opacity));
comp->render(logoTrans);
}