Fixed an issue where the textRelativeScale property was not working correctly for the grid element

This commit is contained in:
Leon Styhre 2023-10-20 17:42:40 +02:00
parent 9283cdff84
commit 12f7d103be

View file

@ -372,8 +372,8 @@ void GridComponent<T>::addEntry(Entry& entry, const std::shared_ptr<ThemeData>&
auto text = std::make_shared<TextComponent>( auto text = std::make_shared<TextComponent>(
entry.name, mFont, 0x000000FF, Alignment::ALIGN_CENTER, Alignment::ALIGN_CENTER, entry.name, mFont, 0x000000FF, Alignment::ALIGN_CENTER, Alignment::ALIGN_CENTER,
glm::vec3 {0.0f, 0.0f, 0.0f}, mItemSize * mTextRelativeScale, 0x00000000, mLineSpacing, glm::vec3 {0.0f, 0.0f, 0.0f}, mItemSize * mTextRelativeScale, 0x00000000, mLineSpacing,
mTextRelativeScale, mTextHorizontalScrolling, mTextHorizontalScrollSpeed, 1.0f, mTextHorizontalScrolling, mTextHorizontalScrollSpeed, mTextHorizontalScrollDelay,
mTextHorizontalScrollDelay, mTextHorizontalScrollGap); mTextHorizontalScrollGap);
text->setOrigin(0.5f, 0.5f); text->setOrigin(0.5f, 0.5f);
text->setColor(mTextColor); text->setColor(mTextColor);
text->setBackgroundColor(mTextBackgroundColor); text->setBackgroundColor(mTextBackgroundColor);