mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-08-03 16:58:24 +02:00
[ui] Controls: add Group custom control
This commit is contained in:
parent
2f307c16fb
commit
1c070c7fdb
2 changed files with 48 additions and 0 deletions
47
meshroom/ui/qml/Controls/Group.qml
Normal file
47
meshroom/ui/qml/Controls/Group.qml
Normal file
|
@ -0,0 +1,47 @@
|
|||
import QtQuick 2.7
|
||||
import QtQuick.Controls 2.3
|
||||
import QtQuick.Layouts 1.3
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue