summaryrefslogtreecommitdiff
path: root/src/ui/sidebarwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r--src/ui/sidebarwidget.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c
index 38c854a2..56b8d097 100644
--- a/src/ui/sidebarwidget.c
+++ b/src/ui/sidebarwidget.c
@@ -1236,6 +1236,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect,
1236 deinit_String(&str); 1236 deinit_String(&str);
1237 } 1237 }
1238 /* Select the layout based on how the title fits. */ 1238 /* Select the layout based on how the title fits. */
1239 int metaFg = isPressing ? fg : uiSubheading_ColorId;
1239 iInt2 titleSize = advanceRange_Text(titleFont, range_String(&d->label)); 1240 iInt2 titleSize = advanceRange_Text(titleFont, range_String(&d->label));
1240 const iInt2 metaSize = advanceRange_Text(uiLabel_FontId, range_String(&d->meta)); 1241 const iInt2 metaSize = advanceRange_Text(uiLabel_FontId, range_String(&d->meta));
1241 pos.x += iconPad; 1242 pos.x += iconPad;
@@ -1245,7 +1246,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect,
1245 /* Must wrap the title. */ 1246 /* Must wrap the title. */
1246 pos.y += (itemHeight - h2 - h2) / 2; 1247 pos.y += (itemHeight - h2 - h2) / 2;
1247 draw_Text( 1248 draw_Text(
1248 uiLabel_FontId, addY_I2(pos, h2 - h1 - gap_UI / 8), fg, "%s \u2014 ", cstr_String(&d->meta)); 1249 uiLabel_FontId, addY_I2(pos, h2 - h1 - gap_UI / 8), metaFg, "%s \u2014 ", cstr_String(&d->meta));
1249 int skip = metaSize.x + advance_Text(uiLabel_FontId, " \u2014 ").x; 1250 int skip = metaSize.x + advance_Text(uiLabel_FontId, " \u2014 ").x;
1250 iInt2 cur = addX_I2(pos, skip); 1251 iInt2 cur = addX_I2(pos, skip);
1251 const char *endPos; 1252 const char *endPos;
@@ -1263,7 +1264,7 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect,
1263 } 1264 }
1264 else { 1265 else {
1265 pos.y += (itemHeight - h1 - h2) / 2; 1266 pos.y += (itemHeight - h1 - h2) / 2;
1266 drawRange_Text(uiLabel_FontId, pos, fg, range_String(&d->meta)); 1267 drawRange_Text(uiLabel_FontId, pos, metaFg, range_String(&d->meta));
1267 drawRange_Text(titleFont, addY_I2(pos, h1), labelFg, range_String(&d->label)); 1268 drawRange_Text(titleFont, addY_I2(pos, h1), labelFg, range_String(&d->label));
1268 } 1269 }
1269 } 1270 }