mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-20 02:04: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
77 lines
2.1 KiB
QML
77 lines
2.1 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.DCommon.Widgets
|
|
|
|
Item {
|
|
id: root
|
|
|
|
component Layer: Rectangle {
|
|
id: layer
|
|
|
|
property string label: ""
|
|
default property alias content: body.data
|
|
|
|
width: parent?.width ?? 0
|
|
height: body.y + body.height + Theme.spacingM
|
|
|
|
StyledText {
|
|
id: caption
|
|
x: Theme.spacingM
|
|
y: Theme.spacingM
|
|
text: layer.label
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
font.weight: Theme.fontWeightMedium
|
|
color: Theme.surfaceText
|
|
}
|
|
|
|
Column {
|
|
id: body
|
|
x: Theme.spacingM
|
|
y: caption.y + caption.height + Theme.spacingS
|
|
width: parent.width - Theme.spacingM * 2
|
|
}
|
|
}
|
|
|
|
width: parent?.width ?? 0
|
|
height: host.height
|
|
|
|
Layer {
|
|
id: host
|
|
label: I18n.tr("Host")
|
|
color: Theme.hostSurface
|
|
radius: Theme.cornerRadiusL
|
|
border.width: Theme.layerOutlineWidth
|
|
border.color: Theme.withAlpha(Theme.outline, Theme.layerOutlineOpacity)
|
|
|
|
Layer {
|
|
label: I18n.tr("Cards")
|
|
color: Theme.cardSurface
|
|
border.width: Theme.layerOutlineWidth
|
|
border.color: Theme.outlineMedium
|
|
radius: Theme.cornerRadiusM
|
|
|
|
Layer {
|
|
label: I18n.tr("Chip", "surface role")
|
|
color: Theme.chipSurface
|
|
radius: Theme.cornerRadiusS
|
|
|
|
Rectangle {
|
|
width: parent.width
|
|
height: nestedLabel.height + Theme.spacingM * 2
|
|
color: Theme.chipSurfaceNested
|
|
radius: Theme.cornerRadiusXS
|
|
|
|
StyledText {
|
|
id: nestedLabel
|
|
anchors.centerIn: parent
|
|
text: I18n.tr("Nested chip", "surface role")
|
|
font.pixelSize: Theme.fontSizeSmall
|
|
font.weight: Theme.fontWeightMedium
|
|
color: Theme.surfaceText
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|