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
57 lines
1.8 KiB
QML
57 lines
1.8 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.DCommon.Widgets
|
|
|
|
SettingsRow {
|
|
id: root
|
|
|
|
property string text: ""
|
|
property string noteIconName: "warning"
|
|
property color tint: Theme.warning
|
|
property color tintBackground: Theme.warningHover
|
|
property bool monospace: false
|
|
property real maxHeight: 0
|
|
|
|
body: Rectangle {
|
|
readonly property real naturalHeight: noteRow.implicitHeight + Theme.spacingS * 2
|
|
|
|
width: parent.width
|
|
height: root.maxHeight > 0 ? Math.min(root.maxHeight, naturalHeight) : naturalHeight
|
|
radius: Theme.cornerRadius
|
|
color: root.tintBackground
|
|
|
|
DFlickable {
|
|
anchors.fill: parent
|
|
anchors.margins: Theme.spacingS
|
|
contentHeight: noteRow.implicitHeight
|
|
interactive: contentHeight > height
|
|
wheelEnabled: interactive
|
|
clip: interactive
|
|
|
|
Row {
|
|
id: noteRow
|
|
width: parent.width
|
|
spacing: Theme.spacingS
|
|
|
|
DIcon {
|
|
visible: root.noteIconName !== ""
|
|
name: root.noteIconName
|
|
size: Theme.iconSizeSmall
|
|
color: root.tint
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
|
|
StyledText {
|
|
width: root.noteIconName !== "" ? parent.width - parent.spacing - Theme.iconSizeSmall : parent.width
|
|
text: root.text
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
isMonospace: root.monospace
|
|
color: root.tint
|
|
wrapMode: root.monospace ? Text.Wrap : Text.WordWrap
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|