mirror of
https://github.com/hyprwm/hyprland-qt-support.git
synced 2025-05-12 21:20:35 +01:00
style: handle keyboard focus
This commit is contained in:
parent
56e611961a
commit
c63f0e7c9b
2 changed files with 21 additions and 1 deletions
|
@ -63,5 +63,15 @@ T.Button {
|
||||||
const base = HyprlandStyle.flat(HyprlandStyle.lightenOrDarken(control.palette.button, 1.4), control.flat);
|
const base = HyprlandStyle.flat(HyprlandStyle.lightenOrDarken(control.palette.button, 1.4), control.flat);
|
||||||
return HyprlandStyle.overlay(base, control.palette.highlight, highlightTint);
|
return HyprlandStyle.overlay(base, control.palette.highlight, highlightTint);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: -1
|
||||||
|
radius: parent.radius + 1
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MotionBehavior on border.color { ColorAnimation { duration: 60 } }
|
||||||
|
border.color: control.visualFocus ? Qt.alpha(control.palette.highlight, 0.8) : "transparent"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,7 +30,7 @@ T.CheckBox {
|
||||||
implicitHeight: 16
|
implicitHeight: 16
|
||||||
|
|
||||||
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
x: control.text ? (control.mirrored ? control.width - width - control.rightPadding : control.leftPadding) : control.leftPadding + (control.availableWidth - width) / 2
|
||||||
y: Math.round(control.topPadding + (control.availableHeight - height) / 2)
|
y: Math.floor(control.topPadding + (control.availableHeight - height) / 2)
|
||||||
|
|
||||||
radius: {
|
radius: {
|
||||||
switch (HyprlandStyle.roundness) {
|
switch (HyprlandStyle.roundness) {
|
||||||
|
@ -65,5 +65,15 @@ T.CheckBox {
|
||||||
checkState: control.checkState
|
checkState: control.checkState
|
||||||
color: control.palette.buttonText
|
color: control.palette.buttonText
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
anchors.margins: -1
|
||||||
|
radius: parent.radius + 1
|
||||||
|
color: "transparent"
|
||||||
|
|
||||||
|
MotionBehavior on border.color { ColorAnimation { duration: 60 } }
|
||||||
|
border.color: control.visualFocus ? Qt.alpha(control.palette.highlight, 0.8) : "transparent"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue