Opened 12 years ago
Last modified 4 years ago
#765 new enhancement/feature request
Enable negative % values for position (x,y) of OSD items
Reported by: | zoff99 | Owned by: | Singesang |
---|---|---|---|
Priority: | minor | Milestone: | version 0.6.0 |
Component: | osd/core | Version: | git master |
Severity: | normal | Keywords: | OSD, xml, style |
Cc: | http://wiki.navit-project.org/index.php/user:usul |
Description
make it possbile to set % values in navit.xml instead of pixels like
x="10%w" -> that would mean 10% of display width
Change History (10)
comment:1 Changed 12 years ago by mineque
comment:2 Changed 12 years ago by zoff99
- Type changed from enhancement/feature request to defect/bug
seems to partially work, but is not in wiki. what does not work is "negativ" and "relative" values like w="-10%"
comment:3 Changed 12 years ago by korrosa
If w="10%" creates an OSD item which is 10% of the screen width (as happens in Navit), what would w="-10%" do? Do you mean w="90%" ? I'm interested in a use case for this scenario...
comment:4 Changed 12 years ago by zoff99
the use case is this:
x="-10%" w="10%"
otherwise you can not make an OSD element that is "dd%"-size and is also pinned to the right edge of the screen. because without "-dd%" you would not know how to set the "x"-value
comment:5 Changed 12 years ago by korrosa
- Summary changed from set % values in navit.xml instead of pixels to Enable negative % values for position (x,y) of OSD items
- Type changed from defect/bug to enhancement/feature request
Understood: negative values for position, not height/width. Makes sense.
comment:6 Changed 12 years ago by zoff99
can u also document these features in the wiki, at least I could not find them at the moment
comment:7 Changed 10 years ago by usul
- Cc http://wiki.navit-project.org/index.php/user:usul added
- Keywords OSD xml style added
- Milestone set to version 0.5.1
Is this already possible? needs to be clearified.
comment:8 Changed 8 years ago by mvglasow (2)
- Severity set to normal
Relative sizes and positions were broken for a long time but should be fully supported from r5910 on.
As for negative positions: this makes sense for absolute values (-60 means 60 pixels from right edge), but for relative values one could simply use x="90%" instead of x="-10%". That would place the item 90% from the left edge, which is 10% from the right edge.
I think we can close this ticket.
comment:9 Changed 5 years ago by http://wiki.navit-project.org/index.php/user:jkoan
- Milestone changed from version 0.5.1 to version 0.5.2
This ticket was pushed back in order to bring 0.5.1 out soon.
comment:10 Changed 4 years ago by http://wiki.navit-project.org/index.php/user:jkoan
- Milestone changed from version 0.5.2 to version 0.6.0
Ticket retargeted after milestone closed
i guess "x" means itself it'll be width...
so we only need % value for:
x=" %" y=" %" w=" %" h=" %"