From c561aaea88f87a549b1813e9842ce0f137db6bea Mon Sep 17 00:00:00 2001 From: Sudheer K Date: Mon, 3 Jun 2013 21:42:39 -0700 Subject: [PATCH] Finished Font Size Changes for Harmattan, Fremantle --- src/qml/Config.qml | 2 +- src/qml/ConfigTickersComponent.qml | 3 ++- src/qml/MarketsTodayLegacyApp.qml | 18 ++++++++++-------- src/qml/StockDetailsComponent.qml | 5 ++++- 4 files changed, 17 insertions(+), 11 deletions(-) diff --git a/src/qml/Config.qml b/src/qml/Config.qml index af5d0d3..160f0dd 100644 --- a/src/qml/Config.qml +++ b/src/qml/Config.qml @@ -13,7 +13,7 @@ Rectangle { width: 800; height: 480 property int componentWidth: screen.width - property int itemHeight: 50 + property int itemHeight: 75 function close(){ Qt.quit(); diff --git a/src/qml/ConfigTickersComponent.qml b/src/qml/ConfigTickersComponent.qml index c7ff4cd..1477a12 100644 --- a/src/qml/ConfigTickersComponent.qml +++ b/src/qml/ConfigTickersComponent.qml @@ -10,7 +10,7 @@ import "Library/js/DBUtility.js" as DBUtility Item { id: tickerTab property int componentWidth - property int itemHeight + property int itemHeight: 75 signal logRequest(string strMessage) Component.onCompleted: { @@ -128,6 +128,7 @@ Item { width: componentWidth height: itemHeight; anchors.top: parent.top + z: 5 color: "#343434" Item { diff --git a/src/qml/MarketsTodayLegacyApp.qml b/src/qml/MarketsTodayLegacyApp.qml index fad35c5..814e41d 100644 --- a/src/qml/MarketsTodayLegacyApp.qml +++ b/src/qml/MarketsTodayLegacyApp.qml @@ -23,9 +23,11 @@ Item { signal newsReloadCompleted(bool success, string strMessage) signal checkNetworkStatus - property int itemHeight: 50 + property int itemHeight: 75 property int titleBarHeight: 60 property int toolBarHeight: 40 + property int fontSizeMed: 24 + property int fontSizeSmall: 20 property int componentWidth: mainPage.width property int autoUpdateInterval: 300000 property bool updateWeekDaysOnly: false @@ -117,17 +119,17 @@ Item { } Row { - x: 30;y: 15; + x: 30;y: (wrapper.height - mainPage.fontSizeMed)/2; width: mainPage.componentWidth - 60; spacing: 5 - 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 + Text { text: stockName; width: parent.width * 30/100; font.pixelSize: mainPage.fontSizeMed; font.bold: true; elide: Text.ElideRight; color: "white"; style: Text.Raised; styleColor: "black" } + Text { text: lastTradedPrice; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; 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: mainPage.fontSizeMed; 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" } + Text { text: volume; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: marketCap; width: parent.width * 15/100; font.pixelSize: mainPage.fontSizeMed; horizontalAlignment: Text.AlignLeft; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } } } @@ -146,7 +148,7 @@ Item { anchors.left: parent.left anchors.leftMargin: 10 anchors.right: parent.right - text: title; font.pixelSize: 18 + text: title; font.pixelSize: mainPage.fontSizeSmall font.bold: false; verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignLeft diff --git a/src/qml/StockDetailsComponent.qml b/src/qml/StockDetailsComponent.qml index 32cefc5..359d9e7 100644 --- a/src/qml/StockDetailsComponent.qml +++ b/src/qml/StockDetailsComponent.qml @@ -16,6 +16,7 @@ Item { id: stockDetailsScreen property int componentWidth: width property int itemHeight: 75 + property int newsItemHeight: 50 property int fontSizeMed: 24 property int fontSizeSmall: 20 property string symbol: "YHOO" @@ -182,7 +183,7 @@ Item { id: stockNewsDelegate Item { - id: newsWrapper; width: stockDetailsLoader.width; height: itemHeight + id: newsWrapper; width: stockDetailsLoader.width; height: newsItemHeight Item { anchors.fill: parent Rectangle { color: "black"; opacity: index % 2 ? 0.2 : 0.4; height: newsWrapper.height - 2; width: newsWrapper.width; y: 1 } @@ -220,6 +221,7 @@ Item { id: stockNameLabel anchors.top: parent.top width: parent.width + z: 5 anchors.horizontalCenter: parent.horizontalCenter height: stockDetailsScreen.fontSizeMed + 15 horizontalAlignment: Text.AlignHCenter; verticalAlignment: Text.AlignVCenter @@ -234,6 +236,7 @@ Item { border.color: "#BFBFBF" color:"#2E2E2E" anchors {top: stockNameLabel.bottom;left: parent.left;right: parent.right} + z: 5 height: (stockDetailsScreen.width > stockDetailsScreen.height)? 105:155 radius: 15 -- 1.7.9.5