summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-11-28 07:48:48 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-11-28 07:48:48 +0200
commite05a704154712184d73d85a3033e01337a11b380 (patch)
tree3aff6fcdda0a4a05dfc49e412eccd4dcc84dece9 /src/ui
parent7c18495eb995f5c5997c201a8eef70b134fa5152 (diff)
Fixed page timestamp; 24-hour time preference
IssueID #349
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/documentwidget.c6
-rw-r--r--src/ui/util.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c
index c41c77d6..aac77572 100644
--- a/src/ui/documentwidget.c
+++ b/src/ui/documentwidget.c
@@ -1038,10 +1038,12 @@ static void updateTimestampBuf_DocumentWidget_(const iDocumentWidget *d) {
1038 d->drawBufs->timestampBuf = NULL; 1038 d->drawBufs->timestampBuf = NULL;
1039 } 1039 }
1040 if (isValid_Time(&d->sourceTime)) { 1040 if (isValid_Time(&d->sourceTime)) {
1041 iString *fmt = timeFormatHourPreference_Lang("page.timestamp");
1041 d->drawBufs->timestampBuf = newRange_TextBuf( 1042 d->drawBufs->timestampBuf = newRange_TextBuf(
1042 uiLabel_FontId, 1043 uiLabel_FontId,
1043 white_ColorId, 1044 white_ColorId,
1044 range_String(collect_String(format_Time(&d->sourceTime, cstr_Lang("page.timestamp"))))); 1045 range_String(collect_String(format_Time(&d->sourceTime, cstr_String(fmt)))));
1046 delete_String(fmt);
1045 } 1047 }
1046 d->drawBufs->flags &= ~updateTimestampBuf_DrawBufsFlag; 1048 d->drawBufs->flags &= ~updateTimestampBuf_DrawBufsFlag;
1047} 1049}
@@ -4792,7 +4794,7 @@ static void drawSideElements_DocumentWidget_(const iDocumentWidget *d) {
4792 bottomLeft_Rect(bounds), 4794 bottomLeft_Rect(bounds),
4793 init_I2(margin, 4795 init_I2(margin,
4794 -margin + -dbuf->timestampBuf->size.y + 4796 -margin + -dbuf->timestampBuf->size.y +
4795 iMax(0, d->scrollY.max + viewPos_DocumentWidget_(d)))), 4797 iMax(0, d->scrollY.max - pos_SmoothScroll(&d->scrollY)))),
4796 tmQuoteIcon_ColorId); 4798 tmQuoteIcon_ColorId);
4797 } 4799 }
4798 unsetClip_Paint(&p); 4800 unsetClip_Paint(&p);
diff --git a/src/ui/util.c b/src/ui/util.c
index 57fa9f3d..baa05082 100644
--- a/src/ui/util.c
+++ b/src/ui/util.c
@@ -2507,6 +2507,7 @@ iWidget *makePreferences_Widget(void) {
2507 alignLeft_WidgetFlag), 2507 alignLeft_WidgetFlag),
2508 "prefs.uilang"); 2508 "prefs.uilang");
2509 } 2509 }
2510 addDialogToggle_(headings, values, "${prefs.time.24h}", "prefs.time.24h");
2510 } 2511 }
2511 /* User Interface. */ { 2512 /* User Interface. */ {
2512 appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.interface}", '2', &headings, &values); 2513 appendTwoColumnTabPage_Widget(tabs, "${heading.prefs.interface}", '2', &headings, &values);