Meshroom/meshroom/ui/qml/Controls/Group.qml
2023-07-03 12:11:29 +02:00

47 lines
1 KiB
QML

import QtQuick 2.15
import QtQuick.Controls 2.15
import QtQuick.Layouts 1.11
import MaterialIcons 2.2
/**
* A custom GroupBox with predefined header.
*/
GroupBox {
id: root
title: ""
property int sidePadding: 6
property alias labelBackground: labelBg
property alias toolBarContent: toolBar.data
padding: 2
leftPadding: sidePadding
rightPadding: sidePadding
topPadding: label.height + padding
background: Item {}
label: Pane {
background: Rectangle {
id: labelBg
color: palette.base
opacity: 0.8
}
padding: 2
width: root.width
RowLayout {
width: parent.width
Label {
text: root.title
Layout.fillWidth: true
elide: Text.ElideRight
padding: 3
font.bold: true
font.pointSize: 8
}
RowLayout {
id: toolBar
height: parent.height
}
}
}
}