[gnome-maps] transitBoardMarker: Use default colors from TransitPlan as fallback



commit 7f93fa48423768fb07a036584bac940f8fbe4050
Author: Marcus Lundblad <ml update uu se>
Date:   Sun Oct 1 21:27:13 2017 +0200

    transitBoardMarker: Use default colors from TransitPlan as fallback
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788407

 src/transitBoardMarker.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/transitBoardMarker.js b/src/transitBoardMarker.js
index bf8c632..a1315b7 100644
--- a/src/transitBoardMarker.js
+++ b/src/transitBoardMarker.js
@@ -30,6 +30,7 @@ const Color = imports.color;
 const Location = imports.location;
 const MapMarker = imports.mapMarker;
 const Place = imports.place;
+const TransitPlan = imports.transitPlan;
 const Utils = imports.utils;
 
 const ICON_SIZE = 12;
@@ -69,11 +70,11 @@ var TransitBoardMarker = new Lang.Class({
      */
     _createActor: function(leg) {
         try {
-            let bgColor = leg.color ? leg.color : '000000';
+            let bgColor = leg.color ? leg.color : TransitPlan.DEFAULT_ROUTE_COLOR;
             let fgColor =
                 Color.getContrastingForegroundColor(bgColor, leg.textColor ?
                                                              leg.textColor :
-                                                             'ffffff');
+                                                             TransitPlan.DEFAULT_ROUTE_TEXT_COLOR);
             let hasOutline =
                 Color.relativeLuminance(bgColor) > OUTLINE_LUMINANCE_THREASHHOLD;
             let bgRed = Color.parseColor(bgColor, 0);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]