@@ -42,7 +42,9 @@ FocusScope {
4242 property bool showDecoration: true
4343 property bool animateDecoration: false
4444 property bool showHighlight: false
45+ property int highlightSize: units.gu(1)
4546 property real shadowOpacity: 0
47+ property bool darkening: false
4648
4749 property real requestedWidth
4850 property real requestedHeight
@@ -82,16 +84,9 @@ FocusScope {
8284 Rectangle {
8385 id: selectionHighlight
8486 anchors.fill: parent
85− anchors.margins: -units.gu(1)
87+ anchors.margins: -root.highlightSize
8688 color: "white"
87− opacity: showHighlight ? 0.15 : 0
88− }
89−
90− Rectangle {
91− anchors { left: selectionHighlight.left; right: selectionHighlight.right; bottom: selectionHighlight.bottom; }
92− height: units.dp(2)
93− color: theme.palette.normal.focus
94− visible: showHighlight
89+ opacity: showHighlight ? 0.55 : 0
9590 }
9691
9792 BorderImage {
@@ -186,4 +181,11 @@ FocusScope {
186181
187182 ]
188183 }
184+
185+ Rectangle {
186+ anchors.fill: parent
187+ color: "black"
188+ opacity: root.darkening && !root.showHighlight ? 0.05 : 0
189+ Behavior on opacity { UbuntuNumberAnimation { duration: UbuntuAnimation.SnapDuration } }
190+ }
189191}