diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-28 07:48:48 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-11-28 07:48:48 +0200 |
commit | e05a704154712184d73d85a3033e01337a11b380 (patch) | |
tree | 3aff6fcdda0a4a05dfc49e412eccd4dcc84dece9 /src/ui/documentwidget.c | |
parent | 7c18495eb995f5c5997c201a8eef70b134fa5152 (diff) |
Fixed page timestamp; 24-hour time preference
IssueID #349
Diffstat (limited to 'src/ui/documentwidget.c')
-rw-r--r-- | src/ui/documentwidget.c | 6 |
1 files changed, 4 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); |