diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 11:08:37 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-23 11:08:37 +0200 |
commit | f26d86e9e0955d7082f252e6a7503d03efcdf96e (patch) | |
tree | e41c34e58104cb9fbfbbe31ef05e8e7183af47e8 /src/ui/sidebarwidget.c | |
parent | fe9a950c7532a20ab6524690bd1ab0ece35e90e2 (diff) |
Lang: Added a sidebar string; Finnish template
IssueID #192
Diffstat (limited to 'src/ui/sidebarwidget.c')
-rw-r--r-- | src/ui/sidebarwidget.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/ui/sidebarwidget.c b/src/ui/sidebarwidget.c index 8d025569..5ff585a5 100644 --- a/src/ui/sidebarwidget.c +++ b/src/ui/sidebarwidget.c | |||
@@ -492,10 +492,11 @@ static void updateMetrics_SidebarWidget_(iSidebarWidget *d) { | |||
492 | d->maxButtonLabelWidth = 0; | 492 | d->maxButtonLabelWidth = 0; |
493 | for (int i = 0; i < max_SidebarMode; i++) { | 493 | for (int i = 0; i < max_SidebarMode; i++) { |
494 | if (d->modeButtons[i]) { | 494 | if (d->modeButtons[i]) { |
495 | d->maxButtonLabelWidth = iMaxi( | 495 | d->maxButtonLabelWidth = |
496 | d->maxButtonLabelWidth, | 496 | iMaxi(d->maxButtonLabelWidth, |
497 | 3 * gap_UI + | 497 | 3 * gap_UI + measure_Text(font_LabelWidget(d->modeButtons[i]), |
498 | measure_Text(font_LabelWidget(d->modeButtons[i]), normalModeLabels_[i]).x); | 498 | translateCStr_Lang(normalModeLabels_[i])) |
499 | .x); | ||
499 | } | 500 | } |
500 | } | 501 | } |
501 | updateItemHeight_SidebarWidget_(d); | 502 | updateItemHeight_SidebarWidget_(d); |
@@ -702,11 +703,15 @@ static void checkModeButtonLayout_SidebarWidget_(iSidebarWidget *d) { | |||
702 | if (!button) continue; | 703 | if (!button) continue; |
703 | setFlags_Widget(as_Widget(button), tight_WidgetFlag, isTight); | 704 | setFlags_Widget(as_Widget(button), tight_WidgetFlag, isTight); |
704 | if (i == feeds_SidebarMode && d->numUnreadEntries) { | 705 | if (i == feeds_SidebarMode && d->numUnreadEntries) { |
705 | updateText_LabelWidget(button, | 706 | updateText_LabelWidget( |
706 | collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s", | 707 | button, |
707 | tightModeLabels_[i], | 708 | collectNewFormat_String("%s " uiTextAction_ColorEscape "%zu%s", |
708 | d->numUnreadEntries, | 709 | tightModeLabels_[i], |
709 | !isTight ? " ${sidebar.unread}" : "")); | 710 | d->numUnreadEntries, |
711 | !isTight | ||
712 | ? (d->numUnreadEntries == 1 ? " ${sidebar.unread}" | ||
713 | : " ${sidebar.unread.many}") | ||
714 | : "")); | ||
710 | } | 715 | } |
711 | else { | 716 | else { |
712 | updateTextCStr_LabelWidget(button, | 717 | updateTextCStr_LabelWidget(button, |