mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 14:15:38 +00:00
Fixed an issue where the rating stars would not display properly in the metadata editor and in the scraper.
Also fixed a minor rounding issue.
This commit is contained in:
parent
7df27c2eb1
commit
503ff07d81
|
@ -108,10 +108,12 @@ void RatingComponent::onSizeChanged()
|
|||
mSize.x = mSize.y * NUM_RATING_STARS;
|
||||
|
||||
mIconFilled.getTexture()->setSize(mSize.y, mSize.y);
|
||||
mIconFilled.setTileSize(mSize.y, mSize.y);
|
||||
mIconFilled.setResize(glm::vec2 {std::round(mSize.y * mImageRatio) * NUM_RATING_STARS, mSize.y},
|
||||
true);
|
||||
|
||||
mIconUnfilled.getTexture()->setSize(mSize.y, mSize.y);
|
||||
mIconUnfilled.setTileSize(mSize.y, mSize.y);
|
||||
mIconUnfilled.setResize(
|
||||
glm::vec2 {std::round(mSize.y * mImageRatio) * NUM_RATING_STARS, mSize.y}, true);
|
||||
}
|
||||
|
@ -225,7 +227,7 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
}
|
||||
}
|
||||
|
||||
mIconFilled.setTileSize(mSize.y * mImageRatio, mSize.y);
|
||||
mIconFilled.setTileSize(std::round(mSize.y * mImageRatio), mSize.y);
|
||||
mIconFilled.setResize(glm::vec2 {mSize}, false);
|
||||
|
||||
if (properties & PATH && elem->has("filledPath") &&
|
||||
|
@ -241,7 +243,7 @@ void RatingComponent::applyTheme(const std::shared_ptr<ThemeData>& theme,
|
|||
mIconFilled.setImage(std::string(":/graphics/star_filled.svg"), true);
|
||||
}
|
||||
|
||||
mIconUnfilled.setTileSize(mSize.y * mImageRatio, mSize.y);
|
||||
mIconUnfilled.setTileSize(std::round(mSize.y * mImageRatio), mSize.y);
|
||||
mIconUnfilled.setResize(glm::vec2 {mSize}, false);
|
||||
|
||||
if (properties & PATH && elem->has("unfilledPath") &&
|
||||
|
|
Loading…
Reference in a new issue