aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-10-26 19:40:25 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-10-27 16:03:22 +0000
commit1d39e62ada99d85a411e1d6fc26925e342f5b59b (patch)
tree51d824a2bd011b5f4a381c006a3ab290061f701f /src
parent4c0aac07d422e8bce9dfc7f8345e2af62217e886 (diff)
Default: cleanup an unnecessary extra item from the background
The size (and position) of the background item is respected if explicitly defined, so the wrapper item is not needed. This does not reduce or simplify bindings, so the performance boost is not remarkable, but this can improve the qmlbench results by a frame or two depending on the hardware. ;) Change-Id: Ibd45cf02a3eb30b48b4af86e369a1db4cc5d3864 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/imports/controls/MenuItem.qml15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/imports/controls/MenuItem.qml b/src/imports/controls/MenuItem.qml
index d2420d86..2c8eab5f 100644
--- a/src/imports/controls/MenuItem.qml
+++ b/src/imports/controls/MenuItem.qml
@@ -72,16 +72,13 @@ T.MenuItem {
source: control.checkable ? "qrc:/qt-project.org/imports/QtQuick/Controls.2/images/check.png" : ""
}
- background: Item {
+ background: Rectangle {
implicitWidth: 200
implicitHeight: 40
-
- Rectangle {
- x: 1
- y: 1
- width: parent.width - 2
- height: parent.height - 2
- color: control.visualFocus || control.down ? Default.delegateColor : "transparent"
- }
+ x: 1
+ y: 1
+ width: parent.width - 2
+ height: parent.height - 2
+ color: control.visualFocus || control.down ? Default.delegateColor : "transparent"
}
}