summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Pol <aleixpol@kde.org>2015-10-21 13:57:51 (GMT)
committerAleix Pol <aleixpol@kde.org>2015-10-21 13:57:51 (GMT)
commitb480e018b2fe3f2ee4a70d593b274980f13280cb (patch)
tree0f5de46c4cf50e27a94516217593dc8e5ac91743
parentc92c09af95ecbd040ea5d0b4dbbe0e5a943aecc0 (diff)
Improve sizes on phone form factor
Try not to get views under the scroll bar when there's no scroll bar.
-rw-r--r--discover/qml/ApplicationsList.qml2
-rw-r--r--discover/qml/BrowsingPage.qml3
-rw-r--r--discover/qml/PresentUpdatesPage.qml2
-rw-r--r--discover/qml/SourcesPage.qml4
4 files changed, 6 insertions, 5 deletions
diff --git a/discover/qml/ApplicationsList.qml b/discover/qml/ApplicationsList.qml
index 71f500a..0cf7ef7 100644
--- a/discover/qml/ApplicationsList.qml
+++ b/discover/qml/ApplicationsList.qml
@@ -42,7 +42,7 @@ ScrollView {
delegate: GridItem {
id: delegateArea
// checked: view.currentIndex==index
- width: app.actualWidth
+ width: Math.min(app.actualWidth, parentItem.viewport.width)
x: parentItem.proposedMargin
property real contHeight: height*0.8
height: lowLayout.implicitHeight
diff --git a/discover/qml/BrowsingPage.qml b/discover/qml/BrowsingPage.qml
index 385cb9d..bba48f0 100644
--- a/discover/qml/BrowsingPage.qml
+++ b/discover/qml/BrowsingPage.qml
@@ -36,12 +36,13 @@ Item {
}
ScrollView {
+ id: view
anchors.fill: parent
ColumnLayout
{
x: top.proposedMargin
- width: app.actualWidth
+ width: Math.min(app.actualWidth, view.viewport.width)
FeaturedBanner {
Layout.fillWidth: true
diff --git a/discover/qml/PresentUpdatesPage.qml b/discover/qml/PresentUpdatesPage.qml
index 9965ba9..469b65e 100644
--- a/discover/qml/PresentUpdatesPage.qml
+++ b/discover/qml/PresentUpdatesPage.qml
@@ -18,7 +18,7 @@ ScrollView
ColumnLayout
{
x: proposedMargin
- width: app.actualWidth
+ width: Math.min(app.actualWidth, page.viewport.width)
PageHeader {
Layout.fillWidth: true
diff --git a/discover/qml/SourcesPage.qml b/discover/qml/SourcesPage.qml
index 2b00fa0..e5f1b92 100644
--- a/discover/qml/SourcesPage.qml
+++ b/discover/qml/SourcesPage.qml
@@ -26,7 +26,7 @@ Item {
header: PageHeader {
x: page.proposedMargin
- width: app.actualWidth
+ width: Math.min(app.actualWidth, view.viewport.width)
hoverEnabled: false
RowLayout {
anchors.verticalCenter: parent.verticalCenter
@@ -61,7 +61,7 @@ Item {
delegate: ColumnLayout {
id: sourceDelegate
x: page.proposedMargin
- width: app.actualWidth
+ width: Math.min(app.actualWidth, view.viewport.width)
spacing: -2
property QtObject sourceBackend: model.sourceBackend