Opened 12 years ago
Last modified 10 years ago
#895 new defect/bug
hide speed and ETA indicators if there's no destination set
Reported by: | andrea piras 85 | Owned by: | Singesang |
---|---|---|---|
Priority: | minor | Milestone: | version 0.6.0 |
Component: | osd/core | Version: | git master |
Severity: | Keywords: | osd, speed | |
Cc: |
Description
currently, on the android port, when visualizing a map, the window frames that will contain eta, and speed are still visible ( and empty ) even if there's no destination set, it's pointless to display them and they distract / take away useful space to view the map ( I know they are partially transparent, but still ... )
Change History (4)
comment:1 Changed 11 years ago by stkauwitz
comment:2 Changed 11 years ago by tryagain
looks like the
route.route_status==1 ? 1 : (route.route_status==0 ? 1 : (route.route_status==3 ? 1 : (route.route_status==5 ? 1 : (route.route_status==13 ? 1 : (route.route_status==17 ? 2 : (route.route_status==33 ? 2 : 1 )))))))
phrase can be as simple as
(route.route_status==17 ? 2 : (route.route_status==33 ? 2 : 1 ))
or even as
(route.route_status==17 || route.route_status==33) ? 2 : 1
And even more short one,
(route.route_status & 48 )!=0 ? 2 : 1
comment:3 Changed 11 years ago by korrosa
Ha! That was my layout being quoted, and I guess I did it like that so it was easy to see what's going on. I like how it can all be shortened to one line - good work tryagain!
comment:4 Changed 10 years ago by usul
- Keywords osd speed added
- Milestone set to version 0.6.0
So looks to be solved? Maybe a short method would be great, that doesn't create so much hard to read code.
There is a solution via OSD Layout. See the XML-Part in http://wiki.navit-project.org/index.php/OSD_Layouts#Netbook_Layout_2
It switches the OSD-Configuration dependend on the route_status. It works very well on my Android-Tablet.