settings: derive button group compact mode from its natural width

ref #3984
ref #3982

port 2.0

(cherry picked from commit 2dd237a3af)
This commit is contained in:
bbedward authored and dux-ci[bot] committed 2026-10-28 16:25:06 +00:00
1 parent 8aac4c767a
commit e36ef50482
3 files changed
+5 -5

No files matched your search

Generated
+3 -3
View File
@@ -3,11 +3,11 @@
"dank-qml-common": {
"flake": false,
"locked": {
"lastModified": 1793202447,
"narHash": "sha256-vA215yUKc662r8pGclsS15Iq3ZX8OjwMIqO0pMpLAoM=",
"lastModified": 1793204516,
"narHash": "sha256-3s72olezokrN5i76FdbxtpeD4mIzx6MXlt4F6lw87DY=",
"owner": "duxlabs-dev",
"repo": "dux-qml-common",
"rev": "ee87ee32d093fb1e177791dc6b3894c8951d1def",
"rev": "1d1a12d7f3578289e40e3d333910bf74e4e2fc24",
"type": "github"
},
"original": {
@@ -19,7 +19,7 @@ SettingsRow {
property alias textSize: buttonGroup.textSize
property alias checkEnabled: buttonGroup.checkEnabled
readonly property bool compact: width - buttonGroup.width - SettingsMetrics.rowPaddingH * 2 - SettingsMetrics.rowContentSpacing < SettingsMetrics.buttonGroupCompactThreshold
readonly property bool compact: width - buttonGroup.naturalWidth - SettingsMetrics.rowPaddingH * 2 - SettingsMetrics.rowContentSpacing < SettingsMetrics.buttonGroupCompactThreshold
// `values` is index-aligned with `model`.
property var values: []