fix focus frame
This commit is contained in:
parent
0f894f9db2
commit
93a8858617
@ -89,6 +89,38 @@ Item {
|
||||
|
||||
opacity: enabled ? 1.0 : 0.5
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: hover
|
||||
|
||||
anchors {
|
||||
fill: base
|
||||
leftMargin: -margins.left
|
||||
topMargin: -margins.top
|
||||
rightMargin: -margins.right
|
||||
bottomMargin: -margins.bottom
|
||||
}
|
||||
imagePath: "widgets/lineedit"
|
||||
prefix: {
|
||||
if (textEdit.activeFocus)
|
||||
return "focus";
|
||||
else
|
||||
return "hover";
|
||||
}
|
||||
|
||||
opacity: (mouseWatcher.containsMouse||textArea.activeFocus) ? 1 : 0
|
||||
Behavior on opacity {
|
||||
NumberAnimation {
|
||||
duration: 250
|
||||
easing.type: Easing.InOutQuad
|
||||
}
|
||||
}
|
||||
}
|
||||
MouseArea {
|
||||
id: mouseWatcher
|
||||
anchors.fill: hover
|
||||
hoverEnabled: true
|
||||
}
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: base
|
||||
|
||||
@ -102,26 +134,6 @@ Item {
|
||||
}
|
||||
imagePath: "widgets/lineedit"
|
||||
prefix: "base"
|
||||
|
||||
PlasmaCore.FrameSvgItem {
|
||||
id: hover
|
||||
|
||||
anchors {
|
||||
fill: parent
|
||||
leftMargin: -margins.left
|
||||
topMargin: -margins.top
|
||||
rightMargin: -margins.right
|
||||
bottomMargin: -margins.bottom
|
||||
}
|
||||
imagePath: "widgets/lineedit"
|
||||
prefix: {
|
||||
// XXX: missing hover state
|
||||
if (textEdit.activeFocus)
|
||||
return "focus";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Flickable {
|
||||
|
Loading…
Reference in New Issue
Block a user