From 3d8cc3e91700dc91c5e63d56aef9f405e8b2786d Mon Sep 17 00:00:00 2001 From: Sudheer K Date: Mon, 29 Apr 2013 21:06:33 -0700 Subject: [PATCH] Modified font colors for change column --- src/qml/MarketsTodayApp.qml | 9 ++++----- src/qml/MarketsTodayLegacyApp.qml | 31 +------------------------------ src/qml/MarketsTodayWidget.qml | 4 ++-- 3 files changed, 7 insertions(+), 37 deletions(-) diff --git a/src/qml/MarketsTodayApp.qml b/src/qml/MarketsTodayApp.qml index 21c51b6..8542773 100644 --- a/src/qml/MarketsTodayApp.qml +++ b/src/qml/MarketsTodayApp.qml @@ -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" } diff --git a/src/qml/MarketsTodayLegacyApp.qml b/src/qml/MarketsTodayLegacyApp.qml index 010331c..78f9e90 100644 --- a/src/qml/MarketsTodayLegacyApp.qml +++ b/src/qml/MarketsTodayLegacyApp.qml @@ -113,36 +113,7 @@ Item { toolBar.displayIcons = false; } } - /* - Image{ - id: informationIcon - width: 32 - height: 32 - z: 10 - anchors {right: parent.right; rightMargin: 10; verticalCenter: parent.verticalCenter} - visible: false - source: "Library/images/information.png" - MouseArea{ - anchors.fill: parent; - onPressed: { - //console.log("Image clicked"); - mainPage.selectedSymbol = symbol; - uiLoader.sourceComponent = stockDetailsComponent; - titleBar.buttonType = "Back"; - titleBar.displayMenu = false; - toolBar.displayIcons = false; - } - } - } - MouseArea { - anchors.fill: parent - onPressed:{ - informationIcon.visible = true; - //console.log("Rectangle clicked"); - } - } - */ } Row { @@ -153,7 +124,7 @@ Item { 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";} + 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" } diff --git a/src/qml/MarketsTodayWidget.qml b/src/qml/MarketsTodayWidget.qml index 7e34ce7..c3327b1 100644 --- a/src/qml/MarketsTodayWidget.qml +++ b/src/qml/MarketsTodayWidget.qml @@ -136,10 +136,10 @@ Item { width: parent.width * 20/100; height: parent.height spacing: 2 Text { text: change; font.pixelSize: 16; 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; 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 * 30/100; font.pixelSize: 18; verticalAlignment:Text.AlignVCenter; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } -- 1.7.9.5