diff options
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 4497506d..21ef465c 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -1357,24 +1357,29 @@ static void draw_SidebarItem_(const iSidebarItem *d, iPaint *p, iRect itemRect, | |||
1357 | const int h1 = lineHeight_Text(uiLabel_FontId); | 1357 | const int h1 = lineHeight_Text(uiLabel_FontId); |
1358 | const int h2 = lineHeight_Text(titleFont); | 1358 | const int h2 = lineHeight_Text(titleFont); |
1359 | iRect iconArea = { addY_I2(pos, 0), init_I2(iconPad, itemHeight) }; | 1359 | iRect iconArea = { addY_I2(pos, 0), init_I2(iconPad, itemHeight) }; |
1360 | /* | ||
1360 | if (isUnread) { | 1361 | if (isUnread) { |
1361 | fillRect_Paint( | 1362 | fillRect_Paint( |
1362 | p, | 1363 | p, |
1363 | (iRect){ topLeft_Rect(iconArea), init_I2(gap_UI / 2, height_Rect(iconArea)) }, | 1364 | (iRect){ topLeft_Rect(iconArea), init_I2(gap_UI / 2, height_Rect(iconArea)) }, |
1364 | iconColor); | 1365 | iconColor); |
1365 | } | 1366 | }*/ |
1366 | /* Icon. */ { | 1367 | /* Icon. */ { |
1367 | /* TODO: Use the primary hue from the theme of this site. */ | 1368 | /* TODO: Use the primary hue from the theme of this site. */ |
1368 | iString str; | 1369 | iString str; |
1369 | initUnicodeN_String(&str, &d->icon, 1); | 1370 | initUnicodeN_String(&str, &d->icon, 1); |
1371 | /* TODO: Add to palette. */ | ||
1372 | const int unreadIconColor = uiTextCaution_ColorId; | ||
1373 | const int readIconColor = | ||
1374 | isDark_ColorTheme(colorTheme_App()) ? uiText_ColorId : uiAnnotation_ColorId; | ||
1370 | drawCentered_Text(uiLabelLarge_FontId, | 1375 | drawCentered_Text(uiLabelLarge_FontId, |
1371 | adjusted_Rect(iconArea, init_I2(gap_UI, 0), zero_I2()), | 1376 | adjusted_Rect(iconArea, init_I2(gap_UI, 0), zero_I2()), |
1372 | iTrue, | 1377 | iTrue, |
1373 | isHover && isPressing | 1378 | isHover && isPressing |
1374 | ? iconColor | 1379 | ? iconColor |
1375 | : isUnread ? uiTextCaution_ColorId | 1380 | : isUnread ? unreadIconColor |
1376 | : d->listItem.isSelected ? iconColor | 1381 | : d->listItem.isSelected ? iconColor |
1377 | : uiText_ColorId, | 1382 | : readIconColor, |
1378 | "%s", | 1383 | "%s", |
1379 | cstr_String(&str)); | 1384 | cstr_String(&str)); |
1380 | deinit_String(&str); | 1385 | deinit_String(&str); |