mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-22 03: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
55 lines
1.5 KiB
QML
55 lines
1.5 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.DCommon.Widgets
|
|
|
|
Column {
|
|
id: root
|
|
|
|
property string headerText: ""
|
|
property string detailsText: ""
|
|
// !TODO: plugin API only, popouts no longer draw a close button; drop once plugins stop setting it
|
|
property bool showCloseButton: false
|
|
property var closePopout: null
|
|
property var parentPopout: null
|
|
property alias headerActions: headerActionsLoader.sourceComponent
|
|
|
|
readonly property int headerHeight: popoutHeader.visible ? popoutHeader.height : 0
|
|
readonly property int detailsHeight: popoutDetails.visible ? popoutDetails.implicitHeight : 0
|
|
|
|
spacing: 0
|
|
|
|
Item {
|
|
id: popoutHeader
|
|
width: parent.width
|
|
height: 40
|
|
visible: headerText.length > 0
|
|
|
|
StyledText {
|
|
anchors.left: parent.left
|
|
anchors.leftMargin: Theme.spacingS
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
text: root.headerText
|
|
font.pixelSize: Theme.fontSizeLarge + 4
|
|
color: Theme.surfaceText
|
|
}
|
|
|
|
Loader {
|
|
id: headerActionsLoader
|
|
anchors.right: parent.right
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
}
|
|
}
|
|
|
|
StyledText {
|
|
id: popoutDetails
|
|
width: parent.width
|
|
leftPadding: Theme.spacingS
|
|
bottomPadding: Theme.spacingS
|
|
text: root.detailsText
|
|
font.pixelSize: Theme.fontSizeMedium
|
|
color: Theme.surfaceVariantText
|
|
visible: detailsText.length > 0
|
|
wrapMode: Text.WordWrap
|
|
}
|
|
}
|