From c997a4ff5d83c8f41f5ed7d8c44dfbe61c67b486 Mon Sep 17 00:00:00 2001 From: Alessandro Portale Date: Tue, 7 Sep 2010 20:43:00 +0200 Subject: Fix text size issues for high ppi displays Many layout sizes in flickr are specified by the artwork sizes. The heights and widths are defined in static pixel sizes. Therefore the text has to obey the size restrictions, and should not overlap. This patch sets the font sizes in pixels. Otherwise the default font sizes in points may be too big on high ppi displays. (XM5800 has ~230 ppi) --- demos/declarative/flickr/common/Progress.qml | 2 +- demos/declarative/flickr/mobile/Button.qml | 2 +- demos/declarative/flickr/mobile/ImageDetails.qml | 2 +- demos/declarative/flickr/mobile/ListDelegate.qml | 6 +++--- demos/declarative/flickr/mobile/TitleBar.qml | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/demos/declarative/flickr/common/Progress.qml b/demos/declarative/flickr/common/Progress.qml index 99e1a7b..23bffb9 100644 --- a/demos/declarative/flickr/common/Progress.qml +++ b/demos/declarative/flickr/common/Progress.qml @@ -68,6 +68,6 @@ Item { text: Math.round(progress * 100) + "%" anchors.horizontalCenter: parent.horizontalCenter anchors.verticalCenter: parent.verticalCenter - color: "white"; font.bold: true + color: "white"; font.bold: true; font.pixelSize: 15 } } diff --git a/demos/declarative/flickr/mobile/Button.qml b/demos/declarative/flickr/mobile/Button.qml index 93a6661..6228606 100644 --- a/demos/declarative/flickr/mobile/Button.qml +++ b/demos/declarative/flickr/mobile/Button.qml @@ -66,7 +66,7 @@ Item { } Text { color: "white" - anchors.centerIn: buttonImage; font.bold: true + anchors.centerIn: buttonImage; font.bold: true; font.pixelSize: 15 text: container.text; style: Text.Raised; styleColor: "black" } states: [ diff --git a/demos/declarative/flickr/mobile/ImageDetails.qml b/demos/declarative/flickr/mobile/ImageDetails.qml index 7441ecc..6408fc6 100644 --- a/demos/declarative/flickr/mobile/ImageDetails.qml +++ b/demos/declarative/flickr/mobile/ImageDetails.qml @@ -96,7 +96,7 @@ Flipable { Rectangle { anchors.fill: parent; color: "black"; opacity: 0.4 } Common.Progress { - anchors.centerIn: parent; width: 200; height: 18 + anchors.centerIn: parent; width: 200; height: 22 progress: bigImage.progress; visible: bigImage.status != Image.Ready } diff --git a/demos/declarative/flickr/mobile/ListDelegate.qml b/demos/declarative/flickr/mobile/ListDelegate.qml index 3dd2868..9ec02e1 100644 --- a/demos/declarative/flickr/mobile/ListDelegate.qml +++ b/demos/declarative/flickr/mobile/ListDelegate.qml @@ -55,9 +55,9 @@ Component { } Column { x: 92; width: wrapper.ListView.view.width - 95; y: 15; spacing: 2 - Text { text: title; color: "white"; width: parent.width; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } - Text { text: photoAuthor; width: parent.width; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } - Text { text: photoDate; width: parent.width; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: title; color: "white"; width: parent.width; font.pixelSize: 14; font.bold: true; elide: Text.ElideRight; style: Text.Raised; styleColor: "black" } + Text { text: photoAuthor; width: parent.width; font.pixelSize: 14; elide: Text.ElideLeft; color: "#cccccc"; style: Text.Raised; styleColor: "black" } + Text { text: photoDate; width: parent.width; font.pixelSize: 14; elide: Text.ElideRight; color: "#cccccc"; style: Text.Raised; styleColor: "black" } } } } diff --git a/demos/declarative/flickr/mobile/TitleBar.qml b/demos/declarative/flickr/mobile/TitleBar.qml index 335c315..60ca4dc 100644 --- a/demos/declarative/flickr/mobile/TitleBar.qml +++ b/demos/declarative/flickr/mobile/TitleBar.qml @@ -78,7 +78,7 @@ Item { } elide: Text.ElideLeft text: (rssModel.tags=="" ? untaggedString : taggedString + rssModel.tags) - font.bold: true; color: "White"; style: Text.Raised; styleColor: "Black" + font.bold: true; font.pixelSize: 15; color: "White"; style: Text.Raised; styleColor: "Black" } Button { -- cgit v0.12