Improved the padding consistency for OptionListComponent arrows across different screen resolutions.

This commit is contained in:
Leon Styhre 2021-11-11 19:54:10 +01:00
parent b68640939a
commit 3e59a451c9

View file

@ -326,7 +326,7 @@ private:
mText.setText(ss.str()); mText.setText(ss.str());
mText.setSize(0, mText.getSize().y); mText.setSize(0, mText.getSize().y);
setSize(mText.getSize().x + mRightArrow.getSize().x + setSize(mText.getSize().x + mRightArrow.getSize().x +
24.0f * Renderer::getScreenWidthModifier(), std::round(Font::get(FONT_SIZE_MEDIUM)->getLetterHeight() * 0.68f),
mText.getSize().y); mText.getSize().y);
if (mParent) // Hack since there's no "on child size changed" callback. if (mParent) // Hack since there's no "on child size changed" callback.
mParent->onSizeChanged(); mParent->onSizeChanged();
@ -368,7 +368,7 @@ private:
mText.setSize(0.0f, mText.getSize().y); mText.setSize(0.0f, mText.getSize().y);
setSize(mText.getSize().x + mLeftArrow.getSize().x + mRightArrow.getSize().x + setSize(mText.getSize().x + mLeftArrow.getSize().x + mRightArrow.getSize().x +
24.0f * Renderer::getScreenWidthModifier(), std::round(Font::get(FONT_SIZE_MEDIUM)->getLetterHeight() * 0.68f),
mText.getSize().y); mText.getSize().y);
if (mParent) // Hack since there's no "on child size changed" callback. if (mParent) // Hack since there's no "on child size changed" callback.
mParent->onSizeChanged(); mParent->onSizeChanged();