mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
Fixed a rendering issue when combining rotation and background padding for the clock element
This commit is contained in:
parent
cf73504f74
commit
46370517d9
|
@ -159,11 +159,9 @@ void DateTimeComponent::render(const glm::mat4& parentTrans)
|
|||
return;
|
||||
|
||||
if (mClockMode && mClockBgColor != 0x00000000) {
|
||||
const glm::vec3 positionTemp {mPosition};
|
||||
mPosition.x -= mBackgroundPadding.x / 2.0f;
|
||||
mPosition.y -= mBackgroundPadding.y / 2.0f;
|
||||
|
||||
const glm::mat4 trans {parentTrans * getTransform()};
|
||||
glm::mat4 trans {parentTrans * getTransform()};
|
||||
trans = glm::translate(
|
||||
trans, glm::vec3 {-mBackgroundPadding.x / 2.0f, -mBackgroundPadding.y / 2.0f, 0.0f});
|
||||
mRenderer->setMatrix(trans);
|
||||
|
||||
mRenderer->drawRect(0.0f, 0.0f, mSize.x + mBackgroundPadding.x,
|
||||
|
@ -171,8 +169,6 @@ void DateTimeComponent::render(const glm::mat4& parentTrans)
|
|||
mClockColorGradientHorizontal, mThemeOpacity, 1.0f,
|
||||
Renderer::BlendFactor::SRC_ALPHA,
|
||||
Renderer::BlendFactor::ONE_MINUS_SRC_ALPHA, mBackgroundCornerRadius);
|
||||
|
||||
mPosition = positionTemp;
|
||||
}
|
||||
|
||||
// Render the component.
|
||||
|
|
Loading…
Reference in a new issue