mirror of https://github.com/fairyglade/ly.git
bigclock: attempt to use the same format as the small clock...it will
truncate non numeric characters, of course, but this works in my testing
This commit is contained in:
parent
4ee2b3ecc7
commit
a543baee65
|
|
@ -239,8 +239,8 @@ void alpha_blit(struct tb_cell* buf, uint16_t x, uint16_t y, uint16_t w, uint16_
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_bigclock(struct term_buf* buf)
|
void draw_bigclock(struct term_buf* buf)
|
||||||
{
|
{
|
||||||
if (!config.bigclock)
|
if (!config.bigclock && (config.clock == NULL || strlen(config.clock) == 0))
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +248,7 @@ void draw_bigclock(struct term_buf* buf)
|
||||||
int xo = buf->width / 2 - (5 * (CLOCK_W + 1)) / 2;
|
int xo = buf->width / 2 - (5 * (CLOCK_W + 1)) / 2;
|
||||||
int yo = (buf->height - buf->box_height) / 2 - CLOCK_H - 2;
|
int yo = (buf->height - buf->box_height) / 2 - CLOCK_H - 2;
|
||||||
|
|
||||||
char* clockstr = time_str("%H:%M", 6);
|
char* clockstr = time_str(config.clock, 32);
|
||||||
struct tb_cell* clockcell;
|
struct tb_cell* clockcell;
|
||||||
|
|
||||||
for (int i = 0; i < 5; i++)
|
for (int i = 0; i < 5; i++)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue