X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;ds=sidebyside;f=src%2Fqml%2FStockDetailsComponent.qml;h=32cefc5f7a24dfda6db96a571f66f3d7aace5a1a;hb=0f8d4b44f550d528c2b6b09fb0f6a8c7821caf9f;hp=ede381bb38153af97102dd90d7b32264347a5135;hpb=3adef4c0354db34494fcac678712490d0b7fe466;p=marketstoday diff --git a/src/qml/StockDetailsComponent.qml b/src/qml/StockDetailsComponent.qml index ede381b..32cefc5 100644 --- a/src/qml/StockDetailsComponent.qml +++ b/src/qml/StockDetailsComponent.qml @@ -1,5 +1,5 @@ /* -@version: 0.4 +@version: 0.5 @author: Sudheer K. @license: GNU General Public License */ @@ -15,7 +15,9 @@ Item { id: stockDetailsScreen property int componentWidth: width - property int itemHeight: 50 + property int itemHeight: 75 + property int fontSizeMed: 24 + property int fontSizeSmall: 20 property string symbol: "YHOO" property string stockName: "" property string lastTradedPrice: "" @@ -186,7 +188,7 @@ Item { Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: newsWrapper.height - 2; width: newsWrapper.width; y: 1 } Text { anchors {verticalCenter: parent.verticalCenter;left: parent.left;leftMargin: 10;right: parent.right} - text: title; font.pixelSize: 14 + text: title; font.pixelSize: stockDetailsScreen.fontSizeSmall font.bold: false; verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft @@ -219,9 +221,9 @@ Item { anchors.top: parent.top width: parent.width anchors.horizontalCenter: parent.horizontalCenter - height: 30 + height: stockDetailsScreen.fontSizeMed + 15 horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter - font.pixelSize: 18; font.bold: true; elide: Text.ElideMiddle; color: "#B8B8B8"; style: Text.Raised; styleColor: "black" + font.pixelSize: stockDetailsScreen.fontSizeMed; font.bold: true; elide: Text.ElideMiddle; color: "#B8B8B8"; style: Text.Raised; styleColor: "black" text: (stockName != "")? (stockName +" ("+symbol+")"):symbol } @@ -232,38 +234,46 @@ Item { border.color: "#BFBFBF" color:"#2E2E2E" anchors {top: stockNameLabel.bottom;left: parent.left;right: parent.right} - height: 125 + height: (stockDetailsScreen.width > stockDetailsScreen.height)? 105:155 radius: 15 Column{ id: stockDetailsColumn - anchors {top: parent.top; left: parent.left; leftMargin: 10} - width: parent.width + anchors {top: parent.top; left: parent.left; leftMargin: 10; right: parent.right; rightMargin: 10} + //spacing: 10 + //width: parent.width StockDetailsRow{ label1: "Last Traded" value1: lastTradedPrice cell1Width: stockDetailsColumn.width/2 + multilineLabel1: false + landscape: (stockDetailsScreen.width > stockDetailsScreen.height) label2: "Day's Range" value2: daysRange cell2Width: stockDetailsColumn.width/2 + multilineLabel2: true } StockDetailsRow{ label1: "Last Trade Time" value1: lastTradedDateTime cell1Width: stockDetailsColumn.width/2 + multilineLabel1: true + landscape: (stockDetailsScreen.width > stockDetailsScreen.height) label2: "52w Range" value2: yearRange cell2Width: stockDetailsColumn.width/2 + multilineLabel2: true } StockDetailsRow{ label1: "Change" value1: ((change != "" && changePercentage != "")? change + " ("+changePercentage+")":"") cell1Width: stockDetailsColumn.width/2 + landscape: (stockDetailsScreen.width > stockDetailsScreen.height) label2: "Volume" value2: marketVolume @@ -274,6 +284,7 @@ Item { label1: "Prev. Close" value1: prevClose cell1Width: stockDetailsColumn.width/2 + landscape: (stockDetailsScreen.width > stockDetailsScreen.height) label2: "Market Cap" value2: marketCap @@ -287,7 +298,7 @@ Item { border.color: "#BFBFBF" color:"#2E2E2E" width: parent.width - anchors {top: stockDetailsSection.bottom;topMargin: 5; + anchors {top: stockDetailsSection.bottom;topMargin: 10; bottom: parent.bottom; left: parent.left; right: parent.right} @@ -418,7 +429,7 @@ Item { width: 130 spacing: 20 anchors {top: parent.top; topMargin: 40; bottom: parent.bottom; - right: chartAreaLand.right;rightMargin: 10} + right: chartAreaLand.right;rightMargin: 60} Row { height: 40 @@ -427,14 +438,14 @@ Item { Library.Button { text: "1d" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("1d"); } Library.Button { text: "5d" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("5d"); } } @@ -446,14 +457,14 @@ Item { Library.Button { text: "3m" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("3m"); } Library.Button { text: "6m" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("6m"); } } @@ -464,14 +475,14 @@ Item { Library.Button { text: "1y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("1y"); } Library.Button { text: "2y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("2y"); } } @@ -482,14 +493,14 @@ Item { Library.Button { text: "5y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("5y"); } Library.Button { text: "max" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("my"); } } @@ -558,7 +569,7 @@ Item { Column { width: 280 spacing: 20 - anchors {verticalCenter: parent.verticalCenter;verticalCenterOffset: 80; horizontalCenter: parent.horizontalCenter} + anchors {verticalCenter: parent.verticalCenter;verticalCenterOffset: 100; horizontalCenter: parent.horizontalCenter} Row { height: 40 @@ -567,28 +578,28 @@ Item { Library.Button { text: "1d" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("1d"); } Library.Button { text: "5d" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("5d"); } Library.Button { text: "3m" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("3m"); } Library.Button { text: "6m" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("6m"); } } @@ -600,28 +611,28 @@ Item { Library.Button { text: "1y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("1y"); } Library.Button { text: "2y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("2y"); } Library.Button { text: "5y" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("5y"); } Library.Button { text: "max" anchors { verticalCenter: parent.verticalCenter} - width: 50; height: 32 + width: 75; height: 40 onClicked: loadChart("my"); } }