mirror of https://github.com/fairyglade/ly.git
added bigclock_format to config.ini
This commit is contained in:
parent
ff0be009ad
commit
463644549b
|
|
@ -12,6 +12,9 @@
|
||||||
# enable/disable big clock
|
# enable/disable big clock
|
||||||
#bigclock = true
|
#bigclock = true
|
||||||
|
|
||||||
|
# Big clock formatting (see strftime specification) [allowed symbols 1-9,-,:]
|
||||||
|
#bigclock_format = %c
|
||||||
|
|
||||||
# The character used to mask the password
|
# The character used to mask the password
|
||||||
#asterisk = *
|
#asterisk = *
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -240,11 +240,11 @@ 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)
|
uint32_t bigclocklength = strlen(config.bigclock_format);
|
||||||
|
if (!config.bigclock || bigclocklength == 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
uint32_t bigclocklength = strlen(config.bigclock_format);
|
|
||||||
|
|
||||||
int xo = (buf->width / 2) - bigclocklength * (CLOCK_W+1) / 2;
|
int xo = (buf->width / 2) - bigclocklength * (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;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue