diff options
author | J-P Nurmi <jpnurmi@theqtcompany.com> | 2015-04-08 18:16:13 +0200 |
---|---|---|
committer | Jari-Pekka Nurmi <jpnurmi@theqtcompany.com> | 2015-04-08 19:18:02 +0300 |
commit | 7b971c28e6098b629b8e9e3e38a9465a3f1bd459 (patch) | |
tree | c5c475894671c0cc7e38d59287d3c2d6ba46128b /examples/quick | |
parent | 1c0edf002a50a765a66349d733cf170f4a4024ef (diff) |
Rename Style to Theme
Change-Id: I0186cd36f0b42ca015b70a09af27f8a3517d4a60
Reviewed-by: Jari-Pekka Nurmi <jpnurmi@theqtcompany.com>
Diffstat (limited to 'examples/quick')
-rw-r--r-- | examples/quick/calendar/main.qml | 12 | ||||
-rw-r--r-- | examples/quick/controls/controls.pro | 2 | ||||
-rw-r--r-- | examples/quick/controls/drawer/main.qml | 16 | ||||
-rw-r--r-- | examples/quick/controls/mirroring/main.qml | 10 | ||||
-rw-r--r-- | examples/quick/controls/tabs/main.qml | 62 | ||||
-rw-r--r-- | examples/quick/controls/theme/main.cpp (renamed from examples/quick/controls/styles/main.cpp) | 0 | ||||
-rw-r--r-- | examples/quick/controls/theme/main.qml (renamed from examples/quick/controls/styles/main.qml) | 38 | ||||
-rw-r--r-- | examples/quick/controls/theme/theme.pro (renamed from examples/quick/controls/styles/styles.pro) | 4 | ||||
-rw-r--r-- | examples/quick/controls/theme/theme.qrc (renamed from examples/quick/controls/styles/styles.qrc) | 0 |
9 files changed, 72 insertions, 72 deletions
diff --git a/examples/quick/calendar/main.qml b/examples/quick/calendar/main.qml index 645b05dd..82d71ecb 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: Style.spacing + spacing: Theme.spacing Text { width: parent.width height: implicitHeight * 2 @@ -129,7 +129,7 @@ ApplicationWindow { width: delegate.contentItem.width / 7 height: delegate.contentItem.height / 6 opacity: model.month === delegate.month ? 1 : 0 - color: model.today ? Style.accentColor : Style.textColor + color: model.today ? Theme.accentColor : Theme.textColor Rectangle { z: -1 anchors.centerIn: parent @@ -137,8 +137,8 @@ ApplicationWindow { height: width radius: width / 2 opacity: 0.5 - color: pressed ? Style.pressColor : "transparent" - border.color: eventModel.eventsForDate(model.date).length > 0 ? Style.accentColor : "transparent" + color: pressed ? Theme.pressColor : "transparent" + border.color: eventModel.eventsForDate(model.date).length > 0 ? Theme.accentColor : "transparent" } } } @@ -146,7 +146,7 @@ ApplicationWindow { z: -1 parent: calendar anchors.fill: parent - border.color: Style.frameColor + border.color: Theme.frameColor } } @@ -185,7 +185,7 @@ ApplicationWindow { Rectangle { width: (parent.width > parent.height ? (parent.width - parent.spacing) * 0.4 : parent.width) height: (parent.height > parent.width ? (parent.height - parent.spacing) * 0.4 : parent.height) - border.color: Style.frameColor + border.color: Theme.frameColor ListView { id: eventsListView diff --git a/examples/quick/controls/controls.pro b/examples/quick/controls/controls.pro index b39b9aea..37087c42 100644 --- a/examples/quick/controls/controls.pro +++ b/examples/quick/controls/controls.pro @@ -2,5 +2,5 @@ TEMPLATE = subdirs SUBDIRS += \ drawer \ mirroring \ - styles \ + theme \ tabs diff --git a/examples/quick/controls/drawer/main.qml b/examples/quick/controls/drawer/main.qml index 8ab67829..55385a6a 100644 --- a/examples/quick/controls/drawer/main.qml +++ b/examples/quick/controls/drawer/main.qml @@ -53,7 +53,7 @@ ApplicationWindow { id: content anchors.fill: parent anchors.margins: -1 - border.color: Style.frameColor + border.color: Theme.frameColor Image { width: window.width / 2 @@ -98,13 +98,13 @@ ApplicationWindow { model: VisualItemModel { Label { text: "Settings" - x: Style.padding - width: parent.width - Style.padding * 2 + x: Theme.padding + width: parent.width - Theme.padding * 2 lineHeight: 2.0 - color: Style.accentColor + color: Theme.accentColor verticalAlignment: Text.AlignVCenter } - Rectangle { width: parent.width; height: 1; color: Style.frameColor } + Rectangle { width: parent.width; height: 1; color: Theme.frameColor } Switch { id: dim text: "Dim" @@ -113,7 +113,7 @@ ApplicationWindow { layoutDirection: Qt.RightToLeft enabled: effect.current != uncover } - Rectangle { width: parent.width; height: 1; color: Style.frameColor } + Rectangle { width: parent.width; height: 1; color: Theme.frameColor } RadioButton { id: overlay text: "Overlay" @@ -136,14 +136,14 @@ ApplicationWindow { Exclusive.group: effect layoutDirection: Qt.RightToLeft } - Rectangle { width: parent.width; height: 1; color: Style.frameColor } + Rectangle { width: parent.width; height: 1; color: Theme.frameColor } } Rectangle { z: -1 anchors.fill: parent anchors.topMargin: -1 anchors.bottomMargin: -1 - border.color: Style.frameColor + border.color: Theme.frameColor } transform: Translate { diff --git a/examples/quick/controls/mirroring/main.qml b/examples/quick/controls/mirroring/main.qml index 1bdf8cb2..3deb3cae 100644 --- a/examples/quick/controls/mirroring/main.qml +++ b/examples/quick/controls/mirroring/main.qml @@ -67,7 +67,7 @@ ApplicationWindow { Label { id: label text: "Beyond the essentials." - color: Style.accentColor + color: Theme.accentColor anchors.fill: parent anchors.margins: 48 horizontalAlignment: Text.AlignHCenter @@ -89,7 +89,7 @@ ApplicationWindow { width: parent.width height: 1 anchors.bottom: parent.bottom - color: Style.frameColor + color: Theme.frameColor } } @@ -157,7 +157,7 @@ ApplicationWindow { width: flow.width Row { width: parent.width - spacing: Style.spacing + spacing: Theme.spacing readonly property real availableWidth: (flow.width - 12) / 2 readonly property real contentWidth: okButton.implicitWidth + cancelButton.implicitWidth + 12 readonly property real buttonWidth: contentWidth > availableWidth ? (width / 2 - spacing) : (width / 2 - 2 * spacing) / 2 @@ -196,7 +196,7 @@ ApplicationWindow { width: flow.width Column { width: parent.width - spacing: Style.spacing + spacing: Theme.spacing ProgressBar { width: parent.width indeterminate: true @@ -213,7 +213,7 @@ ApplicationWindow { width: flow.width Column { width: parent.width - spacing: Style.spacing + spacing: Theme.spacing Slider { id: slider value: 0.4 diff --git a/examples/quick/controls/tabs/main.qml b/examples/quick/controls/tabs/main.qml index 38db6e87..5e68d79b 100644 --- a/examples/quick/controls/tabs/main.qml +++ b/examples/quick/controls/tabs/main.qml @@ -55,7 +55,7 @@ ApplicationWindow { spacing: 1 anchors.fill: parent - background: Rectangle { color: Style.frameColor } + background: Rectangle { color: Theme.frameColor } Rectangle { Tab.title: "Home" @@ -72,7 +72,7 @@ ApplicationWindow { Label { text: "Things just got better" - color: Style.accentColor + color: Theme.accentColor anchors.margins: 40 anchors.top: logo.bottom anchors.left: parent.left @@ -110,46 +110,46 @@ ApplicationWindow { Column { id: feedItem width: parent.width - spacing: Style.spacing + spacing: Theme.spacing Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor visible: index == 0 } - Item { width: 1; height: Style.spacing } + Item { width: 1; height: Theme.spacing } Label { text: model.title - x: Style.padding - width: parent.width - 2 * Style.padding + x: Theme.padding + width: parent.width - 2 * Theme.padding elide: Text.ElideRight - color: Style.accentColor + color: Theme.accentColor font.pointSize: 20 lineHeight: 0.75 } Label { text: model.description textFormat: Text.StyledText - x: Style.padding - width: parent.width - 2 * Style.padding + x: Theme.padding + width: parent.width - 2 * Theme.padding wrapMode: Text.WordWrap } RowLayout { - x: Style.padding - width: parent.width - 2 * Style.padding - spacing: Style.spacing + x: Theme.padding + width: parent.width - 2 * Theme.padding + spacing: Theme.spacing Label { text: model.creator height: parent.height verticalAlignment: Text.AlignVCenter - color: Style.focusColor + color: Theme.focusColor font.pointSize: 8 } Label { text: model.pubDate height: parent.height verticalAlignment: Text.AlignVCenter - opacity: Style.disabledOpacity + opacity: Theme.disabledOpacity font.pointSize: 8 } Item { Layout.fillWidth: true } @@ -161,7 +161,7 @@ ApplicationWindow { Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } } } @@ -200,47 +200,47 @@ ApplicationWindow { Column { id: commentItem width: parent.width - spacing: Style.spacing + spacing: Theme.spacing Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor visible: index == 0 } - Item { width: 1; height: Style.spacing } + Item { width: 1; height: Theme.spacing } Label { text: model.title - x: Style.padding - width: parent.width - 2 * Style.padding + x: Theme.padding + width: parent.width - 2 * Theme.padding elide: Text.ElideRight - color: Style.accentColor + color: Theme.accentColor font.pointSize: 14 lineHeight: 0.75 } - Item { width: 1; height: Style.spacing } + Item { width: 1; height: Theme.spacing } Label { text: model.description textFormat: Text.StyledText - x: Style.padding - width: parent.width - 2 * Style.padding + x: Theme.padding + width: parent.width - 2 * Theme.padding wrapMode: Text.WordWrap } RowLayout { - x: Style.padding - width: parent.width - 2 * Style.padding - spacing: Style.spacing + x: Theme.padding + width: parent.width - 2 * Theme.padding + spacing: Theme.spacing Label { text: model.creator height: parent.height verticalAlignment: Text.AlignVCenter - color: Style.focusColor + color: Theme.focusColor font.pointSize: 8 } Label { text: model.pubDate height: parent.height verticalAlignment: Text.AlignVCenter - opacity: Style.disabledOpacity + opacity: Theme.disabledOpacity font.pointSize: 8 } Item { Layout.fillWidth: true } @@ -252,7 +252,7 @@ ApplicationWindow { Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } } } diff --git a/examples/quick/controls/styles/main.cpp b/examples/quick/controls/theme/main.cpp index 92844360..92844360 100644 --- a/examples/quick/controls/styles/main.cpp +++ b/examples/quick/controls/theme/main.cpp diff --git a/examples/quick/controls/styles/main.qml b/examples/quick/controls/theme/main.qml index c614320d..58f5b5f9 100644 --- a/examples/quick/controls/styles/main.qml +++ b/examples/quick/controls/theme/main.qml @@ -46,13 +46,13 @@ ApplicationWindow { width: 360 height: 520 visible: true - title: "Qt Quick Controls - Styles Example" + title: "Qt Quick Controls - Theme Example" header: ToolBar { ToolButton { label: Text { text: "\u25C0" - color: enabled ? Style.accentColor : Style.frameColor + color: enabled ? Theme.accentColor : Theme.frameColor anchors.centerIn: parent } enabled: stackview.depth > 1 @@ -70,15 +70,15 @@ ApplicationWindow { id: pageComponent Control { id: page - Style.roundness: roundedToggle.checked ? 3 : 0 - Style.accentColor: Qt.hsla(colorSlider.position, 0.5, 0.5, 1.0) - Style.backgroundColor: darkButton.checked ? "#444" : "#fff" - Style.frameColor: darkButton.checked ? "#666" : "#ccc" - Style.textColor: darkButton.checked ? "#eee" : "#111" - Style.pressColor: darkButton.checked ? "#33ffffff" : "#33333333" - Style.baseColor: darkButton.checked ? "#444" : "#eee" + 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" + Theme.textColor: darkButton.checked ? "#eee" : "#111" + Theme.pressColor: darkButton.checked ? "#33ffffff" : "#33333333" + Theme.baseColor: darkButton.checked ? "#444" : "#eee" background: Rectangle { - color: Style.backgroundColor + color: Theme.backgroundColor } Flickable { anchors.fill: parent @@ -94,7 +94,7 @@ ApplicationWindow { Label { text: "Code less. Create more." - color: Style.accentColor + color: Theme.accentColor width: parent.width horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -107,7 +107,7 @@ ApplicationWindow { Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } Column { @@ -115,7 +115,7 @@ ApplicationWindow { width: parent.width Label { text: "Accent color" - color: Style.textColor + color: Theme.textColor } Slider { id: colorSlider @@ -127,11 +127,11 @@ ApplicationWindow { Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } ExclusiveGroup { - id: styleGroup + id: themeGroup } Column { @@ -143,21 +143,21 @@ ApplicationWindow { width: parent.width checked: true layoutDirection: Qt.RightToLeft - Exclusive.group: styleGroup + Exclusive.group: themeGroup } RadioButton { id: darkButton text: "Dark" width: parent.width layoutDirection: Qt.RightToLeft - Exclusive.group: styleGroup + Exclusive.group: themeGroup } } Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } ToggleButton { @@ -171,7 +171,7 @@ ApplicationWindow { Rectangle { width: parent.width height: 1 - color: Style.frameColor + color: Theme.frameColor } Button { diff --git a/examples/quick/controls/styles/styles.pro b/examples/quick/controls/theme/theme.pro index f8fdec46..0208bd4f 100644 --- a/examples/quick/controls/styles/styles.pro +++ b/examples/quick/controls/theme/theme.pro @@ -1,5 +1,5 @@ TEMPLATE = app -TARGET = styles +TARGET = theme QT += quick SOURCES += \ @@ -9,4 +9,4 @@ OTHER_FILES += \ main.qml RESOURCES += \ - styles.qrc + theme.qrc diff --git a/examples/quick/controls/styles/styles.qrc b/examples/quick/controls/theme/theme.qrc index 5f6483ac..5f6483ac 100644 --- a/examples/quick/controls/styles/styles.qrc +++ b/examples/quick/controls/theme/theme.qrc |