From f98be82f96a84fa40ddf14cfcafb6706211b5539 Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Sat, 31 May 2025 22:34:10 +0200 Subject: [PATCH] kb key: more flexible size --- .../modules/common/widgets/KeyboardKey.qml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.config/quickshell/modules/common/widgets/KeyboardKey.qml b/.config/quickshell/modules/common/widgets/KeyboardKey.qml index 0288d95a2..d6ba5ba08 100644 --- a/.config/quickshell/modules/common/widgets/KeyboardKey.qml +++ b/.config/quickshell/modules/common/widgets/KeyboardKey.qml @@ -12,20 +12,24 @@ Rectangle { property real horizontalPadding: 7 property real verticalPadding: 2 property real borderWidth: 1 - property real bottomBorderWidth: 2 + property real extraBottomBorderWidth: 2 property color borderColor: Appearance.colors.colOnLayer0 property real borderRadius: 5 property color keyColor: Appearance.m3colors.m3surfaceContainerLow implicitWidth: keyFace.implicitWidth + borderWidth * 2 - implicitHeight: keyFace.implicitHeight + borderWidth * 2 + bottomBorderWidth + implicitHeight: keyFace.implicitHeight + borderWidth * 2 + extraBottomBorderWidth radius: borderRadius color: borderColor Rectangle { id: keyFace - anchors.horizontalCenter: parent.horizontalCenter - anchors.top: parent.top - anchors.topMargin: borderWidth + anchors { + fill: parent + topMargin: borderWidth + leftMargin: borderWidth + rightMargin: borderWidth + bottomMargin: extraBottomBorderWidth + borderWidth + } implicitWidth: keyText.implicitWidth + horizontalPadding * 2 implicitHeight: keyText.implicitHeight + verticalPadding * 2 color: keyColor