diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-23 16:43:21 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-06-23 15:16:15 +0000 |
commit | 0b5035f02501ecadc3c7caf49a547aca240fb00f (patch) | |
tree | 516a772dfeec22c7c6fda1bc03e0fa0cec3357d1 /examples | |
parent | 827fbe0eb0d5722517408e4d2d117347e4e0da6a (diff) |
Tabs example: make the layout fit a narrow screen
Change-Id: If0c38ca0a7ebc600e9706e180609bc73edbe08a7
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/controls/tabs/main.qml | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/examples/quick/controls/tabs/main.qml b/examples/quick/controls/tabs/main.qml index da69dea8..98bec1ee 100644 --- a/examples/quick/controls/tabs/main.qml +++ b/examples/quick/controls/tabs/main.qml @@ -149,6 +149,7 @@ ApplicationWindow { width: parent.width - 2 * Theme.padding spacing: Theme.spacing Label { + id: discoverCreator text: model.creator height: parent.height verticalAlignment: Text.AlignVCenter @@ -158,12 +159,15 @@ ApplicationWindow { Label { text: model.pubDate height: parent.height + elide: Text.ElideRight verticalAlignment: Text.AlignVCenter opacity: Theme.disabledOpacity font.pointSize: 8 + Layout.preferredWidth: parent.width - discoverCreator.width - discoverMore.width - 2 * parent.spacing + visible: Layout.preferredWidth > 0 } - Item { Layout.fillWidth: true } Button { + id: discoverMore text: "Read more..." onClicked: Qt.openUrlExternally(model.link) } @@ -237,6 +241,7 @@ ApplicationWindow { width: parent.width - 2 * Theme.padding spacing: Theme.spacing Label { + id: activityCreator text: model.creator height: parent.height verticalAlignment: Text.AlignVCenter @@ -246,12 +251,15 @@ ApplicationWindow { Label { text: model.pubDate height: parent.height + elide: Text.ElideRight verticalAlignment: Text.AlignVCenter opacity: Theme.disabledOpacity font.pointSize: 8 + Layout.preferredWidth: parent.width - activityCreator.width - activityMore.width - 2 * parent.spacing + visible: Layout.preferredWidth > 0 } - Item { Layout.fillWidth: true } Button { + id: activityMore text: "Read more..." onClicked: Qt.openUrlExternally(model.link) } |