From 8627b5b26719f5cc2303e6c0b5c7375231186be8 Mon Sep 17 00:00:00 2001 From: Niels Weber Date: Thu, 11 Sep 2014 13:14:49 +0200 Subject: Set a size for anonymous and reload pictures Change-Id: I5d1428ae489c5d8213db8b60c592b0990ec8fbc3 Reviewed-by: Caroline Chao --- qml/components/HomeScreen.qml | 14 +++++++++----- src/theme.cpp | 2 ++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/qml/components/HomeScreen.qml b/qml/components/HomeScreen.qml index 86c6cc5..d2e75a9 100644 --- a/qml/components/HomeScreen.qml +++ b/qml/components/HomeScreen.qml @@ -237,6 +237,8 @@ Rectangle { anchors.right: parent.right anchors.rightMargin: Theme.margins.ten source: Theme.images.loading + sourceSize.height: Theme.sizes.reloadButtonSize + sourceSize.width: Theme.sizes.reloadButtonSize } MouseArea { anchors.fill: reloadNews @@ -249,13 +251,15 @@ Rectangle { Rectangle { color: Theme.colors.smokewhite - height: tweetArea.height + height: placeHolder.height width: window.width Image { id: placeHolder anchors.verticalCenter: parent.verticalCenter source: Theme.images.anonymous + height: Theme.sizes.twitterAvatarSize + width: Theme.sizes.twitterAvatarSize visible: avatar.status != Image.Ready } @@ -267,9 +271,9 @@ Rectangle { Item { id: tweetArea - width: parent.width - avatar.width - height: childrenRect.height - anchors.left: avatar.right + width: parent.width - placeHolder.width + height: placeHolder.height + anchors.left: placeHolder.right Text { id: userName @@ -309,7 +313,7 @@ Rectangle { anchors.bottom: parent.bottom anchors.margins: Theme.margins.ten clip: true - spacing: Theme.margins.ten + spacing: Theme.margins.fifteen model: tweetModel.model delegate: tweetDelegate diff --git a/src/theme.cpp b/src/theme.cpp index 0245e17..ed8648c 100644 --- a/src/theme.cpp +++ b/src/theme.cpp @@ -120,6 +120,8 @@ Theme::Theme(QObject *parent) m_sizes->insert(QLatin1String("ratingImageHeight"), QVariant(applyRatio(38))); m_sizes->insert(QLatin1String("ratingImageWidth"), QVariant(applyRatio(40))); m_sizes->insert(QLatin1String("infoButtonSize"), QVariant(applyRatio(140))); + m_sizes->insert(QLatin1String("reloadButtonSize"), QVariant(applyRatio(50))); + m_sizes->insert(QLatin1String("twitterAvatarSize"), QVariant(applyRatio(80))); m_images = new QQmlPropertyMap(this); m_images->insert(QLatin1String("back"), QVariant("qrc:/images/BackArrow.svg")); -- cgit v1.2.3