aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/material/ComboBox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 14:58:42 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 16:34:11 +0000
commitf7fa4aad8f4b75f81ab09aa1bf029d9d36d6a70a (patch)
tree19f95e1709b17cd4a75672f93f8bdb88ae40d7d6 /src/imports/controls/material/ComboBox.qml
parent2fd16cf38b067bb7ced59efed86c2ff0cd5bf817 (diff)
Material: move DropShadows back to layer.effect
QTBUG-49979 was fixed, so we can switch back to using layer.effect, which typically leads to one less item and much less bindings. Change-Id: I7d1d1462a90c674b5f849134bb6ac8fe6ff0f231 Reviewed-by: Mitch Curtis <mitch.curtis@theqtcompany.com>
Diffstat (limited to 'src/imports/controls/material/ComboBox.qml')
-rw-r--r--src/imports/controls/material/ComboBox.qml40
1 files changed, 12 insertions, 28 deletions
diff --git a/src/imports/controls/material/ComboBox.qml b/src/imports/controls/material/ComboBox.qml
index 2d1e2899..634b5ed4 100644
--- a/src/imports/controls/material/ComboBox.qml
+++ b/src/imports/controls/material/ComboBox.qml
@@ -74,29 +74,21 @@ T.ComboBox {
//! [contentItem]
//! [background]
- background: Item {
+ background: Rectangle {
implicitWidth: 120
implicitHeight: 32
- Rectangle {
- id: rect
- width: parent.width
- height: parent.height
- radius: 2
- color: control.Material.dialogColor
+ radius: 2
+ color: control.Material.dialogColor
- Behavior on color {
- ColorAnimation {
- duration: 400
- }
+ Behavior on color {
+ ColorAnimation {
+ duration: 400
}
}
- DropShadow {
- source: rect
- visible: control.enabled
- width: parent.width
- height: parent.height
+ layer.enabled: control.enabled
+ layer.effect: DropShadow {
verticalOffset: 1
color: control.Material.dropShadowColor
samples: control.pressed ? 15 : 9
@@ -140,19 +132,11 @@ T.ComboBox {
// ScrollIndicator.vertical: ScrollIndicator { }
}
- background: Item {
- Rectangle {
- id: panel
- width: parent.width
- height: parent.height
- color: control.Material.dialogColor
- }
+ background: Rectangle {
+ color: control.Material.dialogColor
- DropShadow {
- source: panel
- visible: control.enabled
- width: parent.width
- height: parent.height
+ layer.enabled: control.enabled
+ layer.effect: DropShadow {
verticalOffset: 1
color: control.Material.dropShadowColor
samples: 15