Allow text to scale to fit
Change-Id: Iacd4bb78f551b51d092ecde09521b5541e7dadcd
diff --git a/gui/scrolllist.cpp b/gui/scrolllist.cpp
index ec42fe6..7bd4598 100644
--- a/gui/scrolllist.cpp
+++ b/gui/scrolllist.cpp
@@ -266,7 +266,7 @@
// render the text
gr_color(mHeaderFontColor.red, mHeaderFontColor.green, mHeaderFontColor.blue, mHeaderFontColor.alpha);
- gr_textEx(mRenderX + IconOffsetX + 5, yPos + (int)((mHeaderH - mFontHeight) / 2), mLastHeaderValue.c_str(), mFont->GetResource());
+ gr_textEx_scaleW(mRenderX + IconOffsetX + 5, yPos + (int)(mHeaderH / 2), mLastHeaderValue.c_str(), mFont->GetResource(), mRenderW, TEXT_ONLY_RIGHT, 0);
// Add the separator
gr_color(mHeaderSeparatorColor.red, mHeaderSeparatorColor.green, mHeaderSeparatorColor.blue, mHeaderSeparatorColor.alpha);
@@ -346,8 +346,8 @@
// render label text
int textX = mRenderX + maxIconWidth + 5;
- int textY = yPos + (iconAndTextH - mFontHeight) / 2;
- gr_textEx(textX, textY, text, mFont->GetResource());
+ int textY = yPos + (iconAndTextH / 2);
+ gr_textEx_scaleW(textX, textY, text, mFont->GetResource(), mRenderW, TEXT_ONLY_RIGHT, 0);
}
int GUIScrollList::Update(void)