From 65933208ecba47cf225a6632e0a66e9937735a81 Mon Sep 17 00:00:00 2001 From: LemmyCook Date: Sun, 14 Sep 2025 22:03:44 -0400 Subject: [PATCH] NPillVertical: match NHorizontal on margins and color --- Widgets/NPillVertical.qml | 7 +++---- Widgets/NTextVertical.qml | 26 -------------------------- 2 files changed, 3 insertions(+), 30 deletions(-) delete mode 100644 Widgets/NTextVertical.qml diff --git a/Widgets/NPillVertical.qml b/Widgets/NPillVertical.qml index 71ab61f..4babba0 100644 --- a/Widgets/NPillVertical.qml +++ b/Widgets/NPillVertical.qml @@ -45,8 +45,7 @@ Item { // Sizing logic for vertical bars readonly property int iconSize: Math.round(Style.baseWidgetSize * sizeRatio * scaling) readonly property int pillHeight: iconSize - readonly property int pillPaddingHorizontal: Style.marginS * scaling - readonly property int pillPaddingVertical: Style.marginS * scaling + readonly property int pillPaddingVertical: 3 * 2 * scaling // Very precise adjustment don't replace by Style.margin readonly property int pillOverlap: iconSize * 0.5 readonly property int maxPillWidth: iconSize readonly property int maxPillHeight: Math.max(1, textItem.implicitHeight + pillPaddingVertical * 4) @@ -83,7 +82,7 @@ Item { var offset = openDownward ? pillPaddingVertical * 0.75 : -pillPaddingVertical * 0.75 if (forceOpen) { // If its force open, the icon disc background is the same color as the bg pill move text slightly - offset += rightOpen ? -Style.marginXXS * scaling : Style.marginXS * scaling + offset += rightOpen ? -Style.marginXXS * scaling : Style.marginXXS * scaling } return offset } @@ -93,7 +92,7 @@ Item { font.weight: Style.fontWeightMedium horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter - color: Color.mPrimary + color: forceOpen ? Color.mOnSurface : Color.mPrimary visible: revealed } diff --git a/Widgets/NTextVertical.qml b/Widgets/NTextVertical.qml deleted file mode 100644 index 956fe1d..0000000 --- a/Widgets/NTextVertical.qml +++ /dev/null @@ -1,26 +0,0 @@ -import QtQuick -import qs.Commons -import qs.Services - -Column { - id: root - - property string text: "" - property real fontSize: Style.fontSizeXS - property color color: Color.mOnSurface - property int fontWeight: Style.fontWeightBold - - spacing: -2 * scaling - - Repeater { - model: root.text.split("") - NText { - text: modelData - font.family: Settings.data.ui.fontFixed - font.pointSize: root.fontSize - font.weight: root.fontWeight - color: root.color - horizontalAlignment: Text.AlignHCenter - } - } -}