[gnome-maps] transitArrivalMarker: Use default color fallbacks from TransitPlan
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] transitArrivalMarker: Use default color fallbacks from TransitPlan
- Date: Sun, 1 Oct 2017 19:46:43 +0000 (UTC)
commit a9a318f1ef60778e356490037a5a958b8cc011cb
Author: Marcus Lundblad <ml update uu se>
Date: Sun Oct 1 21:30:15 2017 +0200
transitArrivalMarker: Use default color fallbacks from TransitPlan
https://bugzilla.gnome.org/show_bug.cgi?id=788407
src/transitArrivalMarker.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/transitArrivalMarker.js b/src/transitArrivalMarker.js
index ebd1ade..4a401ea 100644
--- a/src/transitArrivalMarker.js
+++ b/src/transitArrivalMarker.js
@@ -23,6 +23,7 @@ const Lang = imports.lang;
const Gdk = imports.gi.Gdk;
+const Color = imports.color;
const Location = imports.location;
const MapMarker = imports.mapMarker;
const Place = imports.place;
@@ -37,15 +38,20 @@ var TransitArrivalMarker = new Lang.Class({
new Location.Location({ latitude: lastPoint.latitude,
longitude: lastPoint.longitude
});
+ let bgColor = params.leg.color ? params.leg.color :
+ TransitPlan.DEFAULT_ROUTE_COLOR;
delete params.leg;
params.place = new Place.Place({ location: location });
this.parent(params);
- let color = new Gdk.RGBA({ red: 0,
- green: 0,
- blue: 0,
+ let bgRed = Color.parseColor(bgColor, 0);
+ let bgGreen = Color.parseColor(bgColor, 1);
+ let bgBlue = Color.parseColor(bgColor, 2);
+ let color = new Gdk.RGBA({ red: bgRed,
+ green: bgGreen,
+ blue: bgBlue,
alpha: 1.0
});
let actor =
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]