Fixed two bugs where the game images were incorrectly scaled in the Video and Grid views. For the Video mode it happened during reload (such as when adding a game as a favorite), and for the Grid view it was always incorrectly scaled

This commit is contained in:
Leon Styhre 2020-05-15 18:24:14 +02:00
parent 3d6adf9ade
commit bac1eba3f8
2 changed files with 3 additions and 3 deletions

View file

@ -99,7 +99,7 @@ GridGameListView::GridGameListView(Window* window, FileData* root) :
mImage.setOrigin(0.5f, 0.5f); mImage.setOrigin(0.5f, 0.5f);
mImage.setPosition(2.0f, 2.0f); mImage.setPosition(2.0f, 2.0f);
mImage.setMaxSize(1.0f, 1.0f); mImage.setMaxSize(mSize.x() * (0.50f - 2*padding), mSize.y() * 0.4f);
mImage.setDefaultZIndex(10); mImage.setDefaultZIndex(10);
mImage.setVisible(false); mImage.setVisible(false);
addChild(&mImage); addChild(&mImage);

View file

@ -62,9 +62,9 @@ VideoGameListView::VideoGameListView(Window* window, FileData* root) :
// Image // Image
mImage.setOrigin(0.5f, 0.5f); mImage.setOrigin(0.5f, 0.5f);
// Default to off the screen // Default to off the screen
mImage.setPosition(2.0f, 2.0f); mImage.setPosition(mSize.x() * 0.25f, mList.getPosition().y() + mSize.y() * 0.2125f);
mImage.setVisible(false); mImage.setVisible(false);
mImage.setMaxSize(1.0f, 1.0f); mImage.setMaxSize(mSize.x() * (0.50f - 2*padding), mSize.y() * 0.4f);
mImage.setDefaultZIndex(30); mImage.setDefaultZIndex(30);
addChild(&mImage); addChild(&mImage);