Replace units.spacing with units.smallSpacing

In line with the new Units API.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Sebastian Kügler 2015-11-06 21:52:30 +00:00 committed by Dirk Hohndel
parent 74586d7922
commit 9dc8f13a0a
3 changed files with 22 additions and 23 deletions

View file

@ -16,7 +16,7 @@ Rectangle {
property real detailsOpacity : 0 property real detailsOpacity : 0
width: diveListView.width - units.spacing width: diveListView.width - units.smallSpacing
height: childrenRect.height height: childrenRect.height
//Mouse region: When clicked, the mode changes to details view //Mouse region: When clicked, the mode changes to details view
@ -41,11 +41,11 @@ Rectangle {
//Layout of the page: (mini profile, dive no, date at the top //Layout of the page: (mini profile, dive no, date at the top
//And other details at the bottom. //And other details at the bottom.
Item { Item {
x: units.spacing x: units.smallSpacing
width: parent.width - units.spacing * 2 width: parent.width - units.smallSpacing * 2
height: childrenRect.height + units.spacing * 2 height: childrenRect.height + units.smallSpacing * 2
//spacing: units.spacing / 2 //spacing: units.smallSpacing / 2
anchors.margins: units.spacing anchors.margins: units.smallSpacing
Text { Text {
id: locationText id: locationText
@ -65,7 +65,7 @@ Rectangle {
anchors { anchors {
right: parent.right right: parent.right
top: parent.top top: parent.top
bottomMargin: units.spacing / 2 bottomMargin: units.smallSpacing / 2
} }
} }
Row { Row {
@ -104,7 +104,7 @@ Rectangle {
opacity: 0.4 opacity: 0.4
anchors { anchors {
right: parent.right right: parent.right
topMargin: units.spacing topMargin: units.smallSpacing
top: locationText.bottom top: locationText.bottom
} }
} }
@ -126,8 +126,8 @@ Rectangle {
Component { Component {
id: tripHeading id: tripHeading
Item { Item {
width: page.width - units.spacing * 2 width: page.width - units.smallSpacing * 2
height: childrenRect.height + units.spacing * 2 height: childrenRect.height + units.smallSpacing * 2
Text { Text {
id: sectionText id: sectionText
@ -135,7 +135,7 @@ Rectangle {
anchors { anchors {
top: parent.top top: parent.top
left: parent.left left: parent.left
leftMargin: units.spacing leftMargin: units.smallSpacing
right: parent.right right: parent.right
} }
color: theme.textColor color: theme.textColor
@ -146,7 +146,7 @@ Rectangle {
anchors { anchors {
top: sectionText.bottom top: sectionText.bottom
left: parent.left left: parent.left
leftMargin: units.spacing leftMargin: units.smallSpacing
right: parent.right right: parent.right
} }
color: theme.accentColor color: theme.accentColor
@ -160,7 +160,7 @@ Rectangle {
model: diveModel model: diveModel
delegate: diveDelegate delegate: diveDelegate
boundsBehavior: Flickable.StopAtBounds boundsBehavior: Flickable.StopAtBounds
//highlight: Rectangle { color: theme.highlightColor; width: units.spacing } //highlight: Rectangle { color: theme.highlightColor; width: units.smallSpacing }
focus: true focus: true
clip: true clip: true
section.property: "trip" section.property: "trip"

View file

@ -12,14 +12,14 @@ Rectangle {
color: theme.accentColor color: theme.accentColor
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: 0 Layout.margins: 0
Layout.minimumHeight: prefsButton.height + units.spacing * 2 Layout.minimumHeight: prefsButton.height + units.smallSpacing * 2
RowLayout { RowLayout {
anchors.bottom: topBar.bottom anchors.bottom: topBar.bottom
anchors.bottomMargin: units.spacing anchors.bottomMargin: units.smallSpacing
anchors.left: topBar.left anchors.left: topBar.left
anchors.leftMargin: units.spacing anchors.leftMargin: units.smallSpacing
anchors.right: topBar.right anchors.right: topBar.right
anchors.rightMargin: units.spacing anchors.rightMargin: units.smallSpacing
Button { Button {
id: backButton id: backButton
Layout.maximumHeight: prefsButton.height Layout.maximumHeight: prefsButton.height
@ -60,7 +60,7 @@ Rectangle {
font.pointSize: 18 font.pointSize: 18
color: theme.accentTextColor color: theme.accentTextColor
anchors.left: backButton.right anchors.left: backButton.right
anchors.leftMargin: units.spacing anchors.leftMargin: units.smallSpacing
//horizontalAlignment: Text.AlignHCenter //horizontalAlignment: Text.AlignHCenter
} }
} }

View file

@ -17,7 +17,6 @@ ApplicationWindow {
Theme.Units { Theme.Units {
id: units id: units
property int spacing: Math.ceil(gridUnit / 3)
} }
Theme.Theme { Theme.Theme {
@ -94,16 +93,16 @@ ApplicationWindow {
Rectangle { Rectangle {
id: topPart id: topPart
color: theme.accentColor color: theme.accentColor
Layout.minimumHeight: units.gridUnit * 2 + units.spacing * 2 Layout.minimumHeight: units.gridUnit * 2 + units.smallSpacing * 2
Layout.fillWidth: true Layout.fillWidth: true
Layout.margins: 0 Layout.margins: 0
RowLayout { RowLayout {
anchors.bottom: topPart.bottom anchors.bottom: topPart.bottom
anchors.bottomMargin: units.spacing anchors.bottomMargin: units.smallSpacing
anchors.left: topPart.left anchors.left: topPart.left
anchors.leftMargin: units.spacing anchors.leftMargin: units.smallSpacing
anchors.right: topPart.right anchors.right: topPart.right
anchors.rightMargin: units.spacing anchors.rightMargin: units.smallSpacing
Image { Image {
source: "qrc:/qml/subsurface-mobile-icon.png" source: "qrc:/qml/subsurface-mobile-icon.png"
Layout.maximumWidth: units.gridUnit * 2 Layout.maximumWidth: units.gridUnit * 2