Hi,
I'm trying to resolve a small cosmetic bug with the width of the
battery gauge in the strip.
I dont like the fact the the width of the battery gauge changes when
the voltage goes from say 10V to 9V. There is a related issue where
10.0V gets displayed as 10.
I fixed this by replacing (in strip.ml):
strip.gauge#set_text (string_of_float value )
by
strip.gauge#set_text (Printf.sprinft "%5.01f" value)
This always display the decimal, but it fix the change of width from
10.0->9.9. Presumably the font used isn't fixed width so the leading
space int " 9.9" isn't as wide as "10.0". The only way I can think of
is by pading the value with a leading 0.
strip.gauge#set_text (Printf.sprinft "%05.01f" value)
This would display 9.9V as 09.9. It's doesn't look perfect, but to me
it looks better then the width of the gauge changing, espacially when
the value oscillate between 10.0 and 9.9...
Another possibility is to get rid of the gauge and add the value in
text somewhere else in the strip.
So let me know which solution you prefer and I'll make sure it gets
added to the CVS.
-yvest
_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel