mirror of
https://github.com/lubosz/overte.git
synced 2025-08-29 14:16:47 +02:00
Add focus shadow
This commit is contained in:
parent
4d74bb04b0
commit
6a22078d2c
1 changed files with 19 additions and 1 deletions
|
@ -9,6 +9,7 @@
|
|||
//
|
||||
|
||||
import QtQuick 2.5
|
||||
import QtGraphicalEffects 1.0
|
||||
|
||||
import "../controls-uit"
|
||||
import "../styles-uit"
|
||||
|
@ -31,10 +32,11 @@ Item {
|
|||
readonly property int frameMarginBottom: iconSize + 2
|
||||
|
||||
children: [
|
||||
focusShadow,
|
||||
decoration,
|
||||
sizeOutline,
|
||||
debugZ,
|
||||
sizeDrag,
|
||||
sizeDrag
|
||||
]
|
||||
|
||||
Text {
|
||||
|
@ -51,6 +53,22 @@ Item {
|
|||
window.height = newSize.y
|
||||
}
|
||||
|
||||
RadialGradient {
|
||||
id: focusShadow
|
||||
width: 2 * window.width
|
||||
height: width
|
||||
x: -width / 4
|
||||
y: window.height / 2 - width / 2
|
||||
visible: window && window.focus && windowContent.visible
|
||||
gradient: Gradient {
|
||||
// GradientStop position 0.5 is at full circumference of circle that fits inside the square.
|
||||
GradientStop { position: 0.0; color: "#ff000000" } // black, 100% opacity
|
||||
GradientStop { position: 0.333; color: "#1f000000" } // black, 12% opacity
|
||||
GradientStop { position: 0.5; color: "#00000000" } // black, 0% opacity
|
||||
GradientStop { position: 1.0; color: "#00000000" }
|
||||
}
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: sizeOutline
|
||||
x: -frameMarginLeft
|
||||
|
|
Loading…
Reference in a new issue