Fix grid padding being 2 times smaller than it should be

This commit is contained in:
Koerty 2018-06-06 23:26:21 +02:00
parent 27670e48d6
commit 8763adedb1

View file

@ -175,7 +175,7 @@ void GridTileComponent::resize()
{ {
const GridTileProperties& currentProperties = getCurrentProperties(); const GridTileProperties& currentProperties = getCurrentProperties();
mImage->setMaxSize(currentProperties.mSize - currentProperties.mPadding); mImage->setMaxSize(currentProperties.mSize - currentProperties.mPadding * 2);
mBackground.setCornerSize(currentProperties.mBackgroundCornerSize); mBackground.setCornerSize(currentProperties.mBackgroundCornerSize);
mBackground.fitTo(currentProperties.mSize - mBackground.getCornerSize() * 2); mBackground.fitTo(currentProperties.mSize - mBackground.getCornerSize() * 2);
} }