Main screen: Shrink the text on dir buttons in grid view

This commit is contained in:
Henrik Rydgård committed 2026-01-20 13:51:24 +01:00
1 parent f98c2484f8
commit 324358e069
1 file changed
+2
+2
View File
@@ -480,6 +480,7 @@ void DirButton::Draw(UIContext &dc) {
if (compact) {
// No folder icon, except "up"
dc.PushScissor(bounds_);
dc.SetFontStyle(*GetTextStyle(dc, UI::TextSize::Small));
if (image == ImageID("I_FOLDER") || image == ImageID("I_FOLDER_PINNED")) {
dc.DrawTextRect(text, bounds_.Inset(5, 2), style.fgColor, ALIGN_VCENTER | FLAG_WRAP_TEXT);
if (pinned_) {
@@ -490,6 +491,7 @@ void DirButton::Draw(UIContext &dc) {
} else {
dc.Draw()->DrawImage(image, bounds_.centerX(), bounds_.centerY(), gridStyle_ ? g_Config.fGameGridScale : 1.0, style.fgColor, ALIGN_CENTER);
}
dc.SetFontStyle(dc.GetTheme().uiFont);
dc.PopScissor();
} else {
bool scissor = false;