mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-17 00:34:01 -04:00
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
40 lines
1.0 KiB
QML
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()
|
|
}
|
|
}
|