paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Cosmetic bug with the battery gauge


From: Pascal Brisset
Subject: Re: [Paparazzi-devel] Cosmetic bug with the battery gauge
Date: Thu, 24 Aug 2006 16:25:42 +0200
User-agent: Debian Thunderbird 1.0.2 (X11/20060724)

Yves,

le redessin de cette jauge est au programme de la release. Je voudrais supprimer cette
"progress_bar" (historique ...) et remplacer par une simple "drawing_area".
Si tu veux le faire, n'h├ęsite pas ! (je suis tellement content de voir quelqu'un se plonger dans
le code Caml)
Si tu insistes, je m'y attaques ce soir :-)

A+

--Pascal

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]