75 lines
2 KiB
QML
75 lines
2 KiB
QML
|
|
import QtQuick
|
||
|
|
import qs.Common
|
||
|
|
import qs.Widgets
|
||
|
|
import qs.Modules.Plugins
|
||
|
|
|
||
|
|
PluginComponent {
|
||
|
|
id: root
|
||
|
|
|
||
|
|
// REQUIRED for popouts to avoid z-order/focus issues with other DMS popouts
|
||
|
|
layerNamespacePlugin: "example-popout"
|
||
|
|
|
||
|
|
property string header: pluginData.header || "Example Popout"
|
||
|
|
|
||
|
|
horizontalBarPill: Component {
|
||
|
|
Row {
|
||
|
|
spacing: Theme.spacingS
|
||
|
|
anchors.verticalCenter: parent.verticalCenter
|
||
|
|
|
||
|
|
DankIcon {
|
||
|
|
name: "menu"
|
||
|
|
size: root.iconSize
|
||
|
|
color: Theme.primary
|
||
|
|
}
|
||
|
|
StyledText {
|
||
|
|
text: root.header
|
||
|
|
font.pixelSize: Theme.fontSizeMedium
|
||
|
|
color: Theme.surfaceText
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
verticalBarPill: Component {
|
||
|
|
Column {
|
||
|
|
spacing: Theme.spacingXS
|
||
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
||
|
|
|
||
|
|
DankIcon {
|
||
|
|
name: "menu"
|
||
|
|
size: root.iconSize
|
||
|
|
color: Theme.primary
|
||
|
|
}
|
||
|
|
StyledText {
|
||
|
|
text: root.header
|
||
|
|
font.pixelSize: Theme.fontSizeSmall
|
||
|
|
color: Theme.surfaceText
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
popoutContent: Component {
|
||
|
|
PopoutComponent {
|
||
|
|
id: popout
|
||
|
|
headerText: root.header
|
||
|
|
detailsText: "This is a generic popout starter. Replace the content below."
|
||
|
|
showCloseButton: true
|
||
|
|
|
||
|
|
// Calculate available height for your content
|
||
|
|
Item {
|
||
|
|
width: parent.width
|
||
|
|
implicitHeight: 200 // Adjust as needed
|
||
|
|
|
||
|
|
StyledText {
|
||
|
|
anchors.centerIn: parent
|
||
|
|
text: "Your custom content goes here.\n\nAccess pluginData for settings.\nCall popout.closePopout() when done."
|
||
|
|
color: Theme.surfaceText
|
||
|
|
horizontalAlignment: Text.AlignHCenter
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
popoutWidth: 360
|
||
|
|
popoutHeight: 300
|
||
|
|
}
|