use hint-focus-over-base to decide where to paint the focus panel

This commit is contained in:
Marco Martin 2011-11-08 14:29:05 +01:00
parent 924d5fcf05
commit c644d41709
3 changed files with 19 additions and 2 deletions

View File

@ -91,7 +91,6 @@ Item {
TextFieldFocus {
id: hover
z: 800
state: textArea.activeFocus ? "focus" : (mouseWatcher.containsMouse ? "hover" : "hidden")
anchors.fill: base
}

View File

@ -92,7 +92,6 @@ Item {
TextFieldFocus {
id: hover
z: 800
state: textInput.activeFocus ? "focus" : (mouseWatcher.containsMouse ? "hover" : "hidden")
anchors.fill: base
}

View File

@ -25,6 +25,25 @@ Item {
id: main
state: parent.state
PlasmaCore.Svg {
id: lineEditSvg
imagePath: "widgets/lineedit"
onRepaintNeeded: {
if (lineEditSvg.hasElement("hint-focus-over-base")) {
main.z = 800
} else {
main.z = 0
}
}
Component.onCompleted: {
if (lineEditSvg.hasElement("hint-focus-over-base")) {
main.z = 800
} else {
main.z = 0
}
}
}
PlasmaCore.FrameSvgItem {
id: hover