mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-05 21:07:52 +00:00
fix padding in temp_print
This commit is contained in:
parent
ed42437dfc
commit
e6a9c02d11
@ -1,6 +1,7 @@
|
||||
2009-03-01
|
||||
* Added if_updatenr
|
||||
* Rewrite human_readable() to minimise amount of padding
|
||||
* Fix padding in temp_print()
|
||||
|
||||
2009-02-17
|
||||
* 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)
|
||||
{
|
||||
double out, plen;
|
||||
int out;
|
||||
size_t plen;
|
||||
|
||||
out = convert_temp_output(n, input_unit);
|
||||
plen = spaced_print(p, p_max_size, "%.lf", 5, out);
|
||||
out = round_to_int(convert_temp_output(n, input_unit));
|
||||
plen = spaced_print(p, p_max_size, "%d", 3, out);
|
||||
|
||||
return !(plen >= p_max_size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user