Files
bbedward ccbf1d38ad widgets: bump qml-common, rename Dank* prefixed widgets to D, add
deprecation notice to plugin compatibility shims

- When qml-common became a thing, we left qs.Widgets shims in place for
  plugin compatibility
- It's annoying to need to maintain them when qml-common has any change,
  add a warning so we can safely deprecate them in the future
- One shot rename the common stuff to D to make it shorter and nicer to
  write
2026-10-05 16:47:19 -04:00

40 lines
1.0 KiB
QML

import QtQuick
import qs.Common
import qs.DCommon.Widgets
SettingsRow {
id: root
property bool selected: false
property string summary: ""
property bool checked: false
property bool toggleVisible: true
property bool toggleEnabled: true
property bool deletable: true
signal toggled(bool checked)
signal deleteRequested
clickable: true
iconName: selected ? "radio_button_checked" : "radio_button_unchecked"
iconColor: selected ? Theme.primary : Theme.surfaceVariantText
subtitle: deleteButton.confirming ? I18n.tr("Confirm Delete") : summary
subtitleColor: deleteButton.confirming ? Theme.error : Theme.surfaceVariantText
DToggle {
visible: root.toggleVisible
hideText: true
text: root.title
activeFocusOnTab: false
checked: root.checked
enabled: root.toggleEnabled
onToggled: value => root.toggled(value)
}
SettingsDeleteButton {
id: deleteButton
visible: root.deletable
onDeleteRequested: root.deleteRequested()
}
}