Modified font colors for change column
[marketstoday] / src / qml / MarketsTodayApp.qml
index 21c51b6..8542773 100644 (file)
@@ -134,9 +134,8 @@ PageStackWindow {
 
                             Text { text: stockName; width: parent.width * 30/100; font.pixelSize: 18; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" }
                             Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
-                            Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100;  font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
-                                    color: if(change >= 0){"green";} else {"red";}
-                                        style: Text.Raised; styleColor: "black" }
+                            Text { text: change !== ""? (change + " ("+changePercentage+")"):""; width: parent.width * 25/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
+                                color: change >= 0 ? "#00ff00":"#ff0000"; style: Text.Raised; styleColor: "black"}
                             Text { text: volume; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                             Text { text: marketCap; width: parent.width * 15/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }
                         }
@@ -175,10 +174,10 @@ PageStackWindow {
                                 width: parent.width * 18/100; height: parent.height
                                 spacing: 2
                                 Text { text: change; font.pixelSize: 16; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight
-                                    color: if(change >= 0){"green";} else {"red";}
+                                    color: change >= 0 ? "#00ff00":"#ff0000";
                                         style: Text.Raised; styleColor: "black" }
                                 Text { text: changePercentage; font.pixelSize: 16; horizontalAlignment: Text.AlignLeft; elide: Text.ElideRight;
-                                    color: if(change >= 0){"green";} else {"red";}
+                                    color: change >= 0 ? "#00ff00":"#ff0000";
                                         style: Text.Raised; styleColor: "black" }
                             }
                             Text { text: volume; width: parent.width * 20/100; font.pixelSize: 18; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" }