aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2016-07-21 10:49:18 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2016-07-21 18:01:14 +0000
commit20942576ff6a6faadf45d5045d80f4d21697c212 (patch)
tree9b7fc9b4d440b8215d4c0e7c13aba3532579b8aa
parentc11916721e7fd808014296c3fb344c602dccee53 (diff)
Material: rename ripple color properties
They are no longer specific to CheckBoxes, but used in most controls. Change-Id: I404aeab706479d0b666529ebdb09caa6b8085cae Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
-rw-r--r--src/imports/controls/material/Button.qml2
-rw-r--r--src/imports/controls/material/CheckBox.qml2
-rw-r--r--src/imports/controls/material/CheckDelegate.qml2
-rw-r--r--src/imports/controls/material/ComboBox.qml2
-rw-r--r--src/imports/controls/material/ItemDelegate.qml2
-rw-r--r--src/imports/controls/material/MenuItem.qml2
-rw-r--r--src/imports/controls/material/RadioButton.qml2
-rw-r--r--src/imports/controls/material/RadioDelegate.qml2
-rw-r--r--src/imports/controls/material/SliderHandle.qml2
-rw-r--r--src/imports/controls/material/SpinBox.qml4
-rw-r--r--src/imports/controls/material/SwipeDelegate.qml2
-rw-r--r--src/imports/controls/material/Switch.qml2
-rw-r--r--src/imports/controls/material/SwitchDelegate.qml2
-rw-r--r--src/imports/controls/material/TabButton.qml2
-rw-r--r--src/imports/controls/material/ToolButton.qml2
-rw-r--r--src/imports/controls/material/qquickmaterialstyle.cpp10
-rw-r--r--src/imports/controls/material/qquickmaterialstyle_p.h8
17 files changed, 25 insertions, 25 deletions
diff --git a/src/imports/controls/material/Button.qml b/src/imports/controls/material/Button.qml
index f69671ff..21224855 100644
--- a/src/imports/controls/material/Button.qml
+++ b/src/imports/controls/material/Button.qml
@@ -114,7 +114,7 @@ T.Button {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/CheckBox.qml b/src/imports/controls/material/CheckBox.qml
index 90794f31..dc59c466 100644
--- a/src/imports/controls/material/CheckBox.qml
+++ b/src/imports/controls/material/CheckBox.qml
@@ -68,7 +68,7 @@ T.CheckBox {
anchor: control
pressed: control.pressed
active: control.down || control.visualFocus || control.hovered
- color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/CheckDelegate.qml b/src/imports/controls/material/CheckDelegate.qml
index 0f843be8..aa2f3b01 100644
--- a/src/imports/controls/material/CheckDelegate.qml
+++ b/src/imports/controls/material/CheckDelegate.qml
@@ -87,7 +87,7 @@ T.CheckDelegate {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index 377a555b..54d89fd2 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -108,7 +108,7 @@ T.ComboBox {
pressed: control.pressed
anchor: control
active: control.pressed || control.visualFocus || control.hovered
- color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/ItemDelegate.qml b/src/imports/controls/material/ItemDelegate.qml
index 9a0463f0..9157bf37 100644
--- a/src/imports/controls/material/ItemDelegate.qml
+++ b/src/imports/controls/material/ItemDelegate.qml
@@ -79,7 +79,7 @@ T.ItemDelegate {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/MenuItem.qml b/src/imports/controls/material/MenuItem.qml
index e792fae9..ff0672a0 100644
--- a/src/imports/controls/material/MenuItem.qml
+++ b/src/imports/controls/material/MenuItem.qml
@@ -87,7 +87,7 @@ T.MenuItem {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/RadioButton.qml b/src/imports/controls/material/RadioButton.qml
index 403b4315..52eed780 100644
--- a/src/imports/controls/material/RadioButton.qml
+++ b/src/imports/controls/material/RadioButton.qml
@@ -68,7 +68,7 @@ T.RadioButton {
anchor: control
pressed: control.pressed
active: control.down || control.visualFocus || control.hovered
- color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/RadioDelegate.qml b/src/imports/controls/material/RadioDelegate.qml
index b8f4fbd5..2d6d3f9e 100644
--- a/src/imports/controls/material/RadioDelegate.qml
+++ b/src/imports/controls/material/RadioDelegate.qml
@@ -87,7 +87,7 @@ T.RadioDelegate {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/SliderHandle.qml b/src/imports/controls/material/SliderHandle.qml
index 62099dcc..1c02cf16 100644
--- a/src/imports/controls/material/SliderHandle.qml
+++ b/src/imports/controls/material/SliderHandle.qml
@@ -72,6 +72,6 @@ Item {
width: 22; height: 22
pressed: root.handlePressed
active: root.handlePressed || root.handleHasFocus || root.handleHovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/SpinBox.qml b/src/imports/controls/material/SpinBox.qml
index da24d85e..3c84fac2 100644
--- a/src/imports/controls/material/SpinBox.qml
+++ b/src/imports/controls/material/SpinBox.qml
@@ -119,7 +119,7 @@ T.SpinBox {
height: parent.height - 2 * control.spacing
pressed: control.up.pressed
active: control.up.pressed || control.up.hovered || control.visualFocus
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
Rectangle {
@@ -153,7 +153,7 @@ T.SpinBox {
height: parent.height - 2 * control.spacing
pressed: control.down.pressed
active: control.down.pressed || control.down.hovered || control.visualFocus
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
Rectangle {
diff --git a/src/imports/controls/material/SwipeDelegate.qml b/src/imports/controls/material/SwipeDelegate.qml
index 4acf4524..7bdce394 100644
--- a/src/imports/controls/material/SwipeDelegate.qml
+++ b/src/imports/controls/material/SwipeDelegate.qml
@@ -96,7 +96,7 @@ T.SwipeDelegate {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
enabled: control.swipe.position === 0
}
diff --git a/src/imports/controls/material/Switch.qml b/src/imports/controls/material/Switch.qml
index f4130926..96cfc4a3 100644
--- a/src/imports/controls/material/Switch.qml
+++ b/src/imports/controls/material/Switch.qml
@@ -63,7 +63,7 @@ T.Switch {
width: 28; height: 28
pressed: control.pressed
active: control.down || control.visualFocus || control.hovered
- color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/SwitchDelegate.qml b/src/imports/controls/material/SwitchDelegate.qml
index 8db4f567..0baef722 100644
--- a/src/imports/controls/material/SwitchDelegate.qml
+++ b/src/imports/controls/material/SwitchDelegate.qml
@@ -87,7 +87,7 @@ T.SwitchDelegate {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
}
diff --git a/src/imports/controls/material/TabButton.qml b/src/imports/controls/material/TabButton.qml
index 0753dc02..9f63bcc4 100644
--- a/src/imports/controls/material/TabButton.qml
+++ b/src/imports/controls/material/TabButton.qml
@@ -67,6 +67,6 @@ T.TabButton {
pressed: control.pressed
anchor: control
active: control.down || control.visualFocus || control.hovered
- color: control.Material.checkBoxUncheckedRippleColor
+ color: control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/ToolButton.qml b/src/imports/controls/material/ToolButton.qml
index fe0e75c8..12cb604d 100644
--- a/src/imports/controls/material/ToolButton.qml
+++ b/src/imports/controls/material/ToolButton.qml
@@ -74,6 +74,6 @@ T.ToolButton {
pressed: control.pressed
anchor: control
active: control.enabled && (control.down || control.visualFocus || control.hovered)
- color: control.checked ? control.Material.checkBoxCheckedRippleColor : control.Material.checkBoxUncheckedRippleColor
+ color: control.checked ? control.Material.highlightedRippleColor : control.Material.rippleColor
}
}
diff --git a/src/imports/controls/material/qquickmaterialstyle.cpp b/src/imports/controls/material/qquickmaterialstyle.cpp
index be9e6d86..a166e729 100644
--- a/src/imports/controls/material/qquickmaterialstyle.cpp
+++ b/src/imports/controls/material/qquickmaterialstyle.cpp
@@ -401,8 +401,8 @@ static const QRgb switchUncheckedTrackColorLight = 0x42000000;
static const QRgb switchUncheckedTrackColorDark = 0x4CFFFFFF;
static const QRgb switchDisabledTrackColorLight = 0x1E000000;
static const QRgb switchDisabledTrackColorDark = 0x19FFFFFF;
-static const QRgb checkBoxUncheckedRippleColorLight = 0x10000000;
-static const QRgb checkBoxUncheckedRippleColorDark = 0x20FFFFFF;
+static const QRgb rippleColorLight = 0x10000000;
+static const QRgb rippleColorDark = 0x20FFFFFF;
static const QRgb spinBoxDisabledIconColorLight = 0xFFCCCCCC;
static const QRgb spinBoxDisabledIconColorDark = 0xFF666666;
@@ -882,12 +882,12 @@ QColor QQuickMaterialStyle::frameColor() const
return QColor::fromRgba(m_theme == Light ? frameColorLight : frameColorDark);
}
-QColor QQuickMaterialStyle::checkBoxUncheckedRippleColor() const
+QColor QQuickMaterialStyle::rippleColor() const
{
- return QColor::fromRgba(m_theme == Light ? checkBoxUncheckedRippleColorLight : checkBoxUncheckedRippleColorDark);
+ return QColor::fromRgba(m_theme == Light ? rippleColorLight : rippleColorDark);
}
-QColor QQuickMaterialStyle::checkBoxCheckedRippleColor() const
+QColor QQuickMaterialStyle::highlightedRippleColor() const
{
QColor pressColor = accentColor();
pressColor.setAlpha(m_theme == Light ? 30 : 50);
diff --git a/src/imports/controls/material/qquickmaterialstyle_p.h b/src/imports/controls/material/qquickmaterialstyle_p.h
index 301748bb..d338e745 100644
--- a/src/imports/controls/material/qquickmaterialstyle_p.h
+++ b/src/imports/controls/material/qquickmaterialstyle_p.h
@@ -80,8 +80,8 @@ class QQuickMaterialStyle : public QQuickStyleAttached
Q_PROPERTY(QColor buttonDisabledColor READ buttonDisabledColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor highlightedButtonColor READ highlightedButtonColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor frameColor READ frameColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor checkBoxUncheckedRippleColor READ checkBoxUncheckedRippleColor NOTIFY paletteChanged FINAL)
- Q_PROPERTY(QColor checkBoxCheckedRippleColor READ checkBoxCheckedRippleColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor rippleColor READ rippleColor NOTIFY paletteChanged FINAL)
+ Q_PROPERTY(QColor highlightedRippleColor READ highlightedRippleColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor switchUncheckedTrackColor READ switchUncheckedTrackColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor switchCheckedTrackColor READ switchCheckedTrackColor NOTIFY paletteChanged FINAL)
Q_PROPERTY(QColor switchUncheckedHandleColor READ switchUncheckedHandleColor NOTIFY paletteChanged FINAL)
@@ -202,8 +202,8 @@ public:
QColor highlightedButtonColor() const;
QColor highlightedButtonDisabledColor() const;
QColor frameColor() const;
- QColor checkBoxUncheckedRippleColor() const;
- QColor checkBoxCheckedRippleColor() const;
+ QColor rippleColor() const;
+ QColor highlightedRippleColor() const;
QColor switchUncheckedTrackColor() const;
QColor switchCheckedTrackColor() const;
QColor switchUncheckedHandleColor() const;