FreeEMS Issues - Tunix | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000267 | Tunix | General Features | public | 2011-09-22 23:30 | 2012-03-30 20:32 |
Reporter | Fred | ||||
Assigned To | dandruczyk | ||||
Priority | low | Severity | minor | Reproducibility | always |
Status | closed | Resolution | won't fix | ||
Platform | All | OS | All | OS Version | All |
Product Version | |||||
Target Version | 0.9.24 | Fixed in Version | 0.9.24 | ||
FirmwareVersion | unknown, updating issue to appear in roadmap | ||||
Summary | 0000267: Make Value Display Of Gauges Not Move Dynamically | ||||
Description | [12:49] <Cheetah> djandruczyk_home: djandruczyk one minor complaint about the gauges, the numbers move, meaning that when it switches to 2 digits from 3 or any other digit count switch it moves! This makes it really hard to read, esp if its moving quickly and even more especially if its hovering around a switch point, [12:49] <Cheetah> eg 99 - 101 kpa [12:49] <Cheetah> or something [12:49] <Cheetah> even a digit change from x.0 to x.1 fucks it up because the char width is different [12:50] <Cheetah> like on a real gauge IMO the decimal or base digit centre should stay at a fixed location SNIP [14:01] <Cheetah> you have the range [14:01] <Cheetah> and you have the dp count [14:01] <Cheetah> so you could centre it at max size and then fix it there [14:05] <djandruczyk_home> (08:01:59 AM) Cheetah: so you could centre it at max size and then fix it there <- doesn't work [14:06] <djandruczyk_home> test is ALREADY centered at the x/y coords specified, how3ever the coord specify the "CENTER" of hte text area, such that it scales properly no matter the size. if you define less chars, i belive it'll still shift [14:06] <djandruczyk_home> i'll look into it though [14:09] <Cheetah> OK, sure, there might be some dynamic movement of centre or initial calc of left and adjust from there or something, it can work somehow though :-) [14:09] <djandruczyk_home> Cheetah: the problem is with fonts is NOT ALL chars are the same width [14:09] <djandruczyk_home> so things'll get clipped [14:10] <Cheetah> Yeah, you'd have to centre on the decimal with all zeros or something [14:10] <djandruczyk_home> the way mtx works is as follows: [14:10] <djandruczyk_home> format the string -> get its dimensions -> move to position -half txt widht /half txt height and render [14:10] <Cheetah> not centre [14:10] <djandruczyk_home> message = g_strdup_printf("%.*f", priv->precision,priv->value); [14:10] <Cheetah> it can definitely be done though [14:10] <djandruczyk_home> cairo_text_extents (cr, message, &extents); [14:10] <djandruczyk_home> cairo_move_to [14:10] <Cheetah> somehow [14:10] <djandruczyk_home> Not easy [14:10] <Cheetah> probably less gui cpu usage too [14:10] <djandruczyk_home> and also mostgauges DO NOT have a decimal point [14:10] <djandruczyk_home> so not extensible [14:10] <Cheetah> they have an imaginary one [14:10] <djandruczyk_home> and a one-off hack [14:11] <Cheetah> centre on the right board of the first whole number digit [14:11] <Cheetah> etc [14:11] <Cheetah> it IS doable, and i dont care much [14:11] <djandruczyk_home> centering on a odd place like that will skew all rescaling/resizing operations [14:11] <Cheetah> just a nice polishing point [14:11] <Cheetah> thats all [14:11] <Cheetah> true [14:11] <djandruczyk_home> my buddy always said "you can't polish a turd" [14:11] <Cheetah> recalc on resize i guess [14:11] <Cheetah> LOL [14:11] <Cheetah> true [14:11] <djandruczyk_home> FUGLY [14:11] <Cheetah> mtx is NOT a turd, though [14:11] <djandruczyk_home> HACK [14:11] <djandruczyk_home> ugly hack at that (decimal point crap) [14:11] <Cheetah> seems hacky now [14:11] <Cheetah> its moving all the time [14:11] <djandruczyk_home> then turn of fthe value display [14:12] <djandruczyk_home> and jsut use the needle like a "real" gauge [14:12] <Cheetah> no, me gusta | ||||
Steps To Reproduce | |||||
Additional Information | |||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|