From 02a3d74c241cc0550b638353de59f9b5edc3f07d Mon Sep 17 00:00:00 2001 From: Lemmy Date: Thu, 12 Mar 2026 00:18:03 -0400 Subject: [PATCH] feat(ncheckbox): allow custom labelSize --- Assets/settings-search-index.json | 12 ++++++++++++ Widgets/NCheckbox.qml | 2 ++ Widgets/NLabel.qml | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Assets/settings-search-index.json b/Assets/settings-search-index.json index bf07197e0..03f4885ed 100644 --- a/Assets/settings-search-index.json +++ b/Assets/settings-search-index.json @@ -656,6 +656,18 @@ "Settings.data.network.bluetoothRssiPollingEnabled" ] }, + { + "labelKey": "common.auto-connect", + "descriptionKey": null, + "widget": "NCheckbox", + "tab": 16, + "tabLabel": "panels.connections.title", + "subTab": 1, + "subTabLabel": "common.bluetooth", + "visibleWhen": [ + "Settings.data.network.bluetoothAutoConnect" + ] + }, { "labelKey": "toast.airplane-mode.title", "descriptionKey": null, diff --git a/Widgets/NCheckbox.qml b/Widgets/NCheckbox.qml index 09ed49f7f..1f363a3b8 100644 --- a/Widgets/NCheckbox.qml +++ b/Widgets/NCheckbox.qml @@ -14,6 +14,7 @@ RowLayout { property color activeColor: Color.mPrimary property color activeOnColor: Color.mOnPrimary property int baseSize: Style.baseWidgetSize * 0.7 + property real labelSize: Style.fontSizeL signal toggled(bool checked) signal entered @@ -24,6 +25,7 @@ RowLayout { NLabel { label: root.label + labelSize: root.labelSize description: root.description visible: root.label !== "" || root.description !== "" } diff --git a/Widgets/NLabel.qml b/Widgets/NLabel.qml index 626a3709e..71073fca7 100644 --- a/Widgets/NLabel.qml +++ b/Widgets/NLabel.qml @@ -14,6 +14,7 @@ ColumnLayout { property color iconColor: Color.mOnSurface property bool showIndicator: false property string indicatorTooltip: "" + property real labelSize: Style.fontSizeL opacity: enabled ? 1.0 : 0.6 spacing: Style.marginXXS @@ -38,7 +39,7 @@ ColumnLayout { id: labelText Layout.fillWidth: true text: root.label - pointSize: Style.fontSizeL + pointSize: root.labelSize font.weight: Style.fontWeightSemiBold color: labelColor wrapMode: Text.WordWrap