From 01d7ae66da344f9aaef039310ac241015ec4cad5 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Thu, 5 Nov 2009 16:56:14 +1000 Subject: Use darker() and lighter() functions from global Qt object rather than from SystemPalette. --- demos/declarative/calculator/CalcButton.qml | 2 +- demos/declarative/calculator/calculator.qml | 2 +- demos/declarative/samegame/content/Button.qml | 2 +- demos/declarative/samegame/samegame.qml | 2 +- examples/declarative/dynamic/dynamic.qml | 2 +- examples/declarative/dynamic/qml/Button.qml | 2 +- examples/declarative/loader/Browser.qml | 4 ++-- examples/declarative/tutorials/samegame/samegame1/Button.qml | 2 +- examples/declarative/tutorials/samegame/samegame1/samegame.qml | 2 +- examples/declarative/tutorials/samegame/samegame2/Button.qml | 2 +- examples/declarative/tutorials/samegame/samegame2/samegame.qml | 2 +- examples/declarative/tutorials/samegame/samegame3/Button.qml | 2 +- examples/declarative/tutorials/samegame/samegame3/samegame.qml | 2 +- examples/declarative/tutorials/samegame/samegame4/content/Button.qml | 2 +- examples/declarative/tutorials/samegame/samegame4/samegame.qml | 2 +- 15 files changed, 16 insertions(+), 16 deletions(-) diff --git a/demos/declarative/calculator/CalcButton.qml b/demos/declarative/calculator/CalcButton.qml index c2e3a81..03ede9c 100644 --- a/demos/declarative/calculator/CalcButton.qml +++ b/demos/declarative/calculator/CalcButton.qml @@ -9,7 +9,7 @@ Rectangle { id: button; width: 50; height: 30 border.color: palette.mid; radius: 6 gradient: Gradient { - GradientStop { id: G1; position: 0.0; color: palette.lighter(palette.button) } + GradientStop { id: G1; position: 0.0; color: Qt.lighter(palette.button) } GradientStop { id: G2; position: 1.0; color: palette.button } } diff --git a/demos/declarative/calculator/calculator.qml b/demos/declarative/calculator/calculator.qml index 8041025..18ee5b9 100644 --- a/demos/declarative/calculator/calculator.qml +++ b/demos/declarative/calculator/calculator.qml @@ -3,7 +3,7 @@ import Qt 4.6 Rectangle { width: 320; height: 270; color: palette.window - SystemPalette { id: palette; colorGroup: Qt.Active } + SystemPalette { id: palette } Script { source: "calculator.js" } Column { diff --git a/demos/declarative/samegame/content/Button.qml b/demos/declarative/samegame/content/Button.qml index 301124e..63cd555 100644 --- a/demos/declarative/samegame/content/Button.qml +++ b/demos/declarative/samegame/content/Button.qml @@ -8,7 +8,7 @@ Rectangle { color: activePalette.button; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8; + border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8; gradient: Gradient { GradientStop { diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml index 4560b56..19b929f 100644 --- a/demos/declarative/samegame/samegame.qml +++ b/demos/declarative/samegame/samegame.qml @@ -5,7 +5,7 @@ Rectangle { id: screen width: 490; height: 720 - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } Item { width: parent.width; anchors.top: parent.top; anchors.bottom: toolBar.top diff --git a/examples/declarative/dynamic/dynamic.qml b/examples/declarative/dynamic/dynamic.qml index 0166b4c..f420a1c 100644 --- a/examples/declarative/dynamic/dynamic.qml +++ b/examples/declarative/dynamic/dynamic.qml @@ -46,7 +46,7 @@ Item { ColorAnimation { duration: 3000 } } - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } // toolbox Rectangle { diff --git a/examples/declarative/dynamic/qml/Button.qml b/examples/declarative/dynamic/qml/Button.qml index 2769cd8..cf2ffa7 100644 --- a/examples/declarative/dynamic/qml/Button.qml +++ b/examples/declarative/dynamic/qml/Button.qml @@ -6,7 +6,7 @@ Rectangle { property var text signal clicked - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } height: text.height + 10 width: text.width + 20 border.width: 1 diff --git a/examples/declarative/loader/Browser.qml b/examples/declarative/loader/Browser.qml index f2cbd3d..9139346 100644 --- a/examples/declarative/loader/Browser.qml +++ b/examples/declarative/loader/Browser.qml @@ -19,7 +19,7 @@ Rectangle { folder: "file:///E:/" // Documents on your S60 phone (or Windows E: drive) } - SystemPalette { id: palette; colorGroup: Qt.Active } + SystemPalette { id: palette } Script { function down(path) { @@ -72,7 +72,7 @@ Rectangle { anchors.fill: parent gradient: Gradient { GradientStop { id: t1; position: 0.0; color: palette.highlight } - GradientStop { id: t2; position: 1.0; color: palette.lighter(palette.highlight) } + GradientStop { id: t2; position: 1.0; color: Qt.lighter(palette.highlight) } } } Item { diff --git a/examples/declarative/tutorials/samegame/samegame1/Button.qml b/examples/declarative/tutorials/samegame/samegame1/Button.qml index 3846cf7..9792a22 100644 --- a/examples/declarative/tutorials/samegame/samegame1/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame1/Button.qml @@ -9,7 +9,7 @@ Rectangle { color: activePalette.button; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8; + border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8; gradient: Gradient { GradientStop { diff --git a/examples/declarative/tutorials/samegame/samegame1/samegame.qml b/examples/declarative/tutorials/samegame/samegame1/samegame.qml index b5546d0..289579a 100644 --- a/examples/declarative/tutorials/samegame/samegame1/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame1/samegame.qml @@ -5,7 +5,7 @@ Rectangle { id: Screen width: 490; height: 720 - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } Item { width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top diff --git a/examples/declarative/tutorials/samegame/samegame2/Button.qml b/examples/declarative/tutorials/samegame/samegame2/Button.qml index 2354218..9e515e0 100644 --- a/examples/declarative/tutorials/samegame/samegame2/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame2/Button.qml @@ -8,7 +8,7 @@ Rectangle { color: activePalette.button; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8; + border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8; gradient: Gradient { GradientStop { diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml index 257e0de..e0e467a 100644 --- a/examples/declarative/tutorials/samegame/samegame2/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml @@ -4,7 +4,7 @@ Rectangle { id: Screen width: 490; height: 720 - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } //![2] Script { source: "samegame.js" } //![2] diff --git a/examples/declarative/tutorials/samegame/samegame3/Button.qml b/examples/declarative/tutorials/samegame/samegame3/Button.qml index 2354218..9e515e0 100644 --- a/examples/declarative/tutorials/samegame/samegame3/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame3/Button.qml @@ -8,7 +8,7 @@ Rectangle { color: activePalette.button; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8; + border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8; gradient: Gradient { GradientStop { diff --git a/examples/declarative/tutorials/samegame/samegame3/samegame.qml b/examples/declarative/tutorials/samegame/samegame3/samegame.qml index 0a7ec0f..e1eb542 100644 --- a/examples/declarative/tutorials/samegame/samegame3/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame3/samegame.qml @@ -5,7 +5,7 @@ Rectangle { id: Screen width: 490; height: 720 - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } Script { source: "samegame.js" } Item { diff --git a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml index 2354218..9e515e0 100644 --- a/examples/declarative/tutorials/samegame/samegame4/content/Button.qml +++ b/examples/declarative/tutorials/samegame/samegame4/content/Button.qml @@ -8,7 +8,7 @@ Rectangle { color: activePalette.button; smooth: true width: txtItem.width + 20; height: txtItem.height + 6 - border.width: 1; border.color: activePalette.darker(activePalette.button); radius: 8; + border.width: 1; border.color: Qt.darker(activePalette.button); radius: 8; gradient: Gradient { GradientStop { diff --git a/examples/declarative/tutorials/samegame/samegame4/samegame.qml b/examples/declarative/tutorials/samegame/samegame4/samegame.qml index e519912..89dc945 100644 --- a/examples/declarative/tutorials/samegame/samegame4/samegame.qml +++ b/examples/declarative/tutorials/samegame/samegame4/samegame.qml @@ -7,7 +7,7 @@ Rectangle { Script { source: "content/samegame.js" } - SystemPalette { id: activePalette; colorGroup: Qt.Active } + SystemPalette { id: activePalette } Item { width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top -- cgit v0.12