aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2015-07-02 12:27:53 +0200
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2015-07-06 10:41:09 +0000
commit36c40a1cebe522e2655ab05d4e461eddbed364c7 (patch)
treeb8d714cd20904933384e04a1209790c2a8625d18 /examples
parent44cb549108913757277bd266c64aac9b2f6e6e8e (diff)
Remove non-color properties from Theme
Better start with a minimal set. It will be also easier to transition from Theme to Palette if it gets done. Change-Id: Ic9951ac5b913f99a84e2b8efb9ae7f8d61177aee Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/quick/calendar/main.qml2
-rw-r--r--examples/quick/controls/mirroring/main.qml6
-rw-r--r--examples/quick/controls/tabs/main.qml38
-rw-r--r--examples/quick/controls/theme/main.qml15
-rw-r--r--examples/quick/extras/drawer/main.qml4
5 files changed, 25 insertions, 40 deletions
diff --git a/examples/quick/calendar/main.qml b/examples/quick/calendar/main.qml
index 759e93a8..628d93d6 100644
--- a/examples/quick/calendar/main.qml
+++ b/examples/quick/calendar/main.qml
@@ -99,7 +99,7 @@ ApplicationWindow {
id: title
x: delegate.contentItem.x
width: delegate.contentItem.width
- spacing: Theme.spacing
+ spacing: 6
Text {
width: parent.width
height: implicitHeight * 2
diff --git a/examples/quick/controls/mirroring/main.qml b/examples/quick/controls/mirroring/main.qml
index 56306c32..286911c5 100644
--- a/examples/quick/controls/mirroring/main.qml
+++ b/examples/quick/controls/mirroring/main.qml
@@ -157,7 +157,7 @@ ApplicationWindow {
width: flow.width
Row {
width: parent.width
- spacing: Theme.spacing
+ spacing: 6
readonly property real availableWidth: (flow.width - 12) / 2
readonly property real contentWidth: okButton.implicitWidth + cancelButton.implicitWidth + 12
readonly property real buttonWidth: implicitWidth > availableWidth ? (width / 2 - spacing) : (width / 2 - 2 * spacing) / 2
@@ -196,7 +196,7 @@ ApplicationWindow {
width: flow.width
Column {
width: parent.width
- spacing: Theme.spacing
+ spacing: 6
ProgressBar {
width: parent.width
indeterminate: true
@@ -213,7 +213,7 @@ ApplicationWindow {
width: flow.width
Column {
width: parent.width
- spacing: Theme.spacing
+ spacing: 6
Slider {
id: slider
value: 0.4
diff --git a/examples/quick/controls/tabs/main.qml b/examples/quick/controls/tabs/main.qml
index 37de78e9..59109108 100644
--- a/examples/quick/controls/tabs/main.qml
+++ b/examples/quick/controls/tabs/main.qml
@@ -120,18 +120,18 @@ ApplicationWindow {
Column {
id: feedItem
width: parent.width
- spacing: Theme.spacing
+ spacing: 6
Rectangle {
width: parent.width
height: 1
color: Theme.frameColor
visible: index == 0
}
- Item { width: 1; height: Theme.spacing }
+ Item { width: 1; height: 6 }
Label {
text: model.title
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
+ x: 6
+ width: parent.width - 12
elide: Text.ElideRight
color: Theme.accentColor
font.pointSize: 20
@@ -140,14 +140,14 @@ ApplicationWindow {
Label {
text: model.description
textFormat: Text.StyledText
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
+ x: 6
+ width: parent.width - 12
wrapMode: Text.WordWrap
}
RowLayout {
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
- spacing: Theme.spacing
+ x: 6
+ width: parent.width - 12
+ spacing: 6
Label {
id: discoverCreator
text: model.creator
@@ -211,35 +211,35 @@ ApplicationWindow {
Column {
id: commentItem
width: parent.width
- spacing: Theme.spacing
+ spacing: 6
Rectangle {
width: parent.width
height: 1
color: Theme.frameColor
visible: index == 0
}
- Item { width: 1; height: Theme.spacing }
+ Item { width: 1; height: 6 }
Label {
text: model.title
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
+ x: 6
+ width: parent.width - 12
elide: Text.ElideRight
color: Theme.accentColor
font.pointSize: 14
lineHeight: 0.75
}
- Item { width: 1; height: Theme.spacing }
+ Item { width: 1; height: 6 }
Label {
text: model.description
textFormat: Text.StyledText
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
+ x: 6
+ width: parent.width - 12
wrapMode: Text.WordWrap
}
RowLayout {
- x: Theme.padding
- width: parent.width - 2 * Theme.padding
- spacing: Theme.spacing
+ x: 6
+ width: parent.width - 12
+ spacing: 6
Label {
id: activityCreator
text: model.creator
diff --git a/examples/quick/controls/theme/main.qml b/examples/quick/controls/theme/main.qml
index f7651a4b..5c44b0a8 100644
--- a/examples/quick/controls/theme/main.qml
+++ b/examples/quick/controls/theme/main.qml
@@ -73,7 +73,6 @@ ApplicationWindow {
id: pageComponent
Control {
id: page
- Theme.roundness: roundedToggle.checked ? 3 : 0
Theme.accentColor: Qt.hsla(colorSlider.position, 0.5, 0.5, 1.0)
Theme.backgroundColor: darkButton.checked ? "#444" : "#fff"
Theme.frameColor: darkButton.checked ? "#666" : "#ccc"
@@ -163,20 +162,6 @@ ApplicationWindow {
color: Theme.frameColor
}
- ToggleButton {
- id: roundedToggle
- width: parent.width
- text: "Rounded corners"
- layoutDirection: Qt.RightToLeft
- checked: true
- }
-
- Rectangle {
- width: parent.width
- height: 1
- color: Theme.frameColor
- }
-
Button {
text: "Push"
anchors.right: parent.right
diff --git a/examples/quick/extras/drawer/main.qml b/examples/quick/extras/drawer/main.qml
index 8e36dc68..e45a69d0 100644
--- a/examples/quick/extras/drawer/main.qml
+++ b/examples/quick/extras/drawer/main.qml
@@ -98,8 +98,8 @@ ApplicationWindow {
model: VisualItemModel {
Label {
text: "Settings"
- x: Theme.padding
- width: parent.width - Theme.padding * 2
+ x: 6
+ width: parent.width - 12
lineHeight: 2.0
color: Theme.accentColor
verticalAlignment: Text.AlignVCenter