forked from Shinonome/dots-hyprland
kb key: more flexible size
This commit is contained in:
@@ -12,20 +12,24 @@ Rectangle {
|
|||||||
property real horizontalPadding: 7
|
property real horizontalPadding: 7
|
||||||
property real verticalPadding: 2
|
property real verticalPadding: 2
|
||||||
property real borderWidth: 1
|
property real borderWidth: 1
|
||||||
property real bottomBorderWidth: 2
|
property real extraBottomBorderWidth: 2
|
||||||
property color borderColor: Appearance.colors.colOnLayer0
|
property color borderColor: Appearance.colors.colOnLayer0
|
||||||
property real borderRadius: 5
|
property real borderRadius: 5
|
||||||
property color keyColor: Appearance.m3colors.m3surfaceContainerLow
|
property color keyColor: Appearance.m3colors.m3surfaceContainerLow
|
||||||
implicitWidth: keyFace.implicitWidth + borderWidth * 2
|
implicitWidth: keyFace.implicitWidth + borderWidth * 2
|
||||||
implicitHeight: keyFace.implicitHeight + borderWidth * 2 + bottomBorderWidth
|
implicitHeight: keyFace.implicitHeight + borderWidth * 2 + extraBottomBorderWidth
|
||||||
radius: borderRadius
|
radius: borderRadius
|
||||||
color: borderColor
|
color: borderColor
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: keyFace
|
id: keyFace
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors {
|
||||||
anchors.top: parent.top
|
fill: parent
|
||||||
anchors.topMargin: borderWidth
|
topMargin: borderWidth
|
||||||
|
leftMargin: borderWidth
|
||||||
|
rightMargin: borderWidth
|
||||||
|
bottomMargin: extraBottomBorderWidth + borderWidth
|
||||||
|
}
|
||||||
implicitWidth: keyText.implicitWidth + horizontalPadding * 2
|
implicitWidth: keyText.implicitWidth + horizontalPadding * 2
|
||||||
implicitHeight: keyText.implicitHeight + verticalPadding * 2
|
implicitHeight: keyText.implicitHeight + verticalPadding * 2
|
||||||
color: keyColor
|
color: keyColor
|
||||||
|
|||||||
Reference in New Issue
Block a user