From 667afa6d64c570703e56cc47cd78af508147565d Mon Sep 17 00:00:00 2001 From: nrand Date: Sun, 28 Sep 2025 15:25:59 +0300 Subject: [PATCH] cheatsheet: added element weight to periodic table --- .../ii/modules/cheatsheet/ElementTile.qml | 24 ++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml b/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml index 70e7b4d69..4d9e33923 100644 --- a/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml +++ b/.config/quickshell/ii/modules/cheatsheet/ElementTile.qml @@ -26,13 +26,35 @@ RippleButton { StyledText { id: elementNumber - anchors.centerIn: parent + anchors.left: parent.left color: Appearance.colors.colOnLayer2 text: root.element.number font.pixelSize: Appearance.font.pixelSize.smallest } } + Rectangle { + anchors { + top: parent.top + right: parent.right + topMargin: 4 + rightMargin: 4 + } + color: Appearance.colors.colLayer2 + radius: Appearance.rounding.full + implicitWidth: Math.max(20, elementWeight.implicitWidth) + implicitHeight: Math.max(20, elementWeight.implicitHeight) + width: height + + StyledText { + id: elementWeight + anchors.right: parent.right + color: Appearance.colors.colOnLayer2 + text: root.element.weight + font.pixelSize: Appearance.font.pixelSize.smallest + } + } + StyledText { id: elementSymbol anchors.centerIn: parent