After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 784231 - Improve compact transit route label rendering
Improve compact transit route label rendering
Status: RESOLVED FIXED
Product: gnome-maps
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gnome-maps-maint
gnome-maps-maint
Depends on:
Blocks:
 
 
Reported: 2017-06-26 21:18 UTC by Marcus Lundblad
Modified: 2017-06-27 20:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot (1.79 MB, image/png)
2017-06-26 21:18 UTC, Marcus Lundblad
  Details
transitPlan: Add function to get compact route labels (2.35 KB, patch)
2017-06-27 20:20 UTC, Marcus Lundblad
committed Details | Review
transitRouteLabel: Use the compactRoute from TransitLeg (2.25 KB, patch)
2017-06-27 20:20 UTC, Marcus Lundblad
committed Details | Review
transitItineraryRow: Refine rendering route labels (2.37 KB, patch)
2017-06-27 20:20 UTC, Marcus Lundblad
committed Details | Review

Description Marcus Lundblad 2017-06-26 21:18:20 UTC
Created attachment 354532 [details]
Screenshot

Currently we always render the route labels in the itinerary overview when there is less than 6 legs in a journey, and just the mode icons when there's more legs than that. However, in some cases even a lower number of legs may "overflow" the route labels, causing ellipsization. A better approach might be to actually try to estimate the cut-off by counting and summing up the number of characters in the compacted route labels (along with a "base width" for actual icons). Computing the actual number of pixels might be a bit hard due to differences in i.e. fonts sizes.
Comment 1 Marcus Lundblad 2017-06-27 20:20:17 UTC
Created attachment 354583 [details] [review]
transitPlan: Add function to get compact route labels

This was moved from the TransitRouteLabel class to be used
when rendering itinerary overviews.
Comment 2 Marcus Lundblad 2017-06-27 20:20:30 UTC
Created attachment 354584 [details] [review]
transitRouteLabel: Use the compactRoute from TransitLeg

Use the compactRoute function in TransitLeg instead of the one
that used to be here.
Comment 3 Marcus Lundblad 2017-06-27 20:20:43 UTC
Created attachment 354585 [details] [review]
transitItineraryRow: Refine rendering route labels

Take into account the space of route labels when deciding
when to render in contracted mode (with use mode icons).
Comment 4 Marcus Lundblad 2017-06-27 20:21:44 UTC
Attachment 354583 [details] pushed as d81b7a9 - transitPlan: Add function to get compact route labels
Attachment 354584 [details] pushed as 9c69268 - transitRouteLabel: Use the compactRoute from TransitLeg
Attachment 354585 [details] pushed as b2c890c - transitItineraryRow: Refine rendering route labels