[gnome-maps/wip/mlundblad/transit-routing] fixup! Add list box row to display a leg of a transit itinerary
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/transit-routing] fixup! Add list box row to display a leg of a transit itinerary
- Date: Tue, 29 Nov 2016 22:04:12 +0000 (UTC)
commit 6762edb6de0074187ef078ee86c2ccfe3c2c4bdf
Author: Marcus Lundblad <ml update uu se>
Date: Tue Nov 29 22:09:21 2016 +0100
fixup! Add list box row to display a leg of a transit itinerary
src/transitLegRow.js | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/transitLegRow.js b/src/transitLegRow.js
index 72b60cb..afd02b0 100644
--- a/src/transitLegRow.js
+++ b/src/transitLegRow.js
@@ -92,9 +92,10 @@ const TransitLegRow = new Lang.Class({
this._routeGrid.add(routeLabel);
}
+ let maxWidthChars = this._print ? -1 : 20;
let headsignLabel = new Gtk.Label({ visible: true, can_focus: false,
use_markup: true, hexpand: true,
- max_width_chars: 20,
+ max_width_chars: maxWidthChars,
ellipsize: Pango.EllipsizeMode.END,
halign: Gtk.Align.START });
if (this._leg.transit && this._leg.headsign) {
@@ -164,6 +165,10 @@ const TransitLegRow = new Lang.Class({
/* hide expand/collaps row in printing mode */
this._footerStack.visible = !this._print;
+
+ /* allow more space for the departure label when printing */
+ if (this._print)
+ this._fromLabel.max_width_chars = -1;
},
_onEvent: function(event) {
@@ -172,7 +177,6 @@ const TransitLegRow = new Lang.Class({
if (isButton && button === 1 && !this._isExpanded &&
type === Gdk.EventType.BUTTON_PRESS) {
- /* TODO: zoom in on starting point */
this._mapView.view.zoom_level = 16;
this._mapView.view.center_on(this._leg.fromCoordinate[0],
this._leg.fromCoordinate[1]);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]