mirror of
https://github.com/Llewellynvdm/conky.git
synced 2025-01-12 19:06:36 +00:00
fix padding in temp_print
This commit is contained in:
parent
ed42437dfc
commit
e6a9c02d11
@ -1,6 +1,7 @@
|
|||||||
2009-03-01
|
2009-03-01
|
||||||
* Added if_updatenr
|
* Added if_updatenr
|
||||||
* Rewrite human_readable() to minimise amount of padding
|
* Rewrite human_readable() to minimise amount of padding
|
||||||
|
* Fix padding in temp_print()
|
||||||
|
|
||||||
2009-02-17
|
2009-02-17
|
||||||
* Added $battery_short patch, sf.net id #2300911 (thanks Swoog)
|
* Added $battery_short patch, sf.net id #2300911 (thanks Swoog)
|
||||||
|
@ -84,10 +84,11 @@ convert_temp_output(double n, enum TEMP_UNIT input_unit)
|
|||||||
|
|
||||||
int temp_print(char *p, size_t p_max_size, double n, enum TEMP_UNIT input_unit)
|
int temp_print(char *p, size_t p_max_size, double n, enum TEMP_UNIT input_unit)
|
||||||
{
|
{
|
||||||
double out, plen;
|
int out;
|
||||||
|
size_t plen;
|
||||||
|
|
||||||
out = convert_temp_output(n, input_unit);
|
out = round_to_int(convert_temp_output(n, input_unit));
|
||||||
plen = spaced_print(p, p_max_size, "%.lf", 5, out);
|
plen = spaced_print(p, p_max_size, "%d", 3, out);
|
||||||
|
|
||||||
return !(plen >= p_max_size);
|
return !(plen >= p_max_size);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user