Provide an abstraction to break up the settings dialog into managable pieces.

This commit is contained in:
Adam Treat
2023-06-28 23:46:03 -04:00
parent 7f252b4970
commit 1cd734efdc
7 changed files with 882 additions and 871 deletions

View File

@@ -0,0 +1,46 @@
import QtCore
import QtQuick
import QtQuick.Controls
import QtQuick.Controls.Basic
import QtQuick.Layouts
Item {
property string title: ""
property Item contentItem: null
onContentItemChanged: function() {
if (contentItem) {
contentItem.parent = tabInner;
contentItem.anchors.left = tabInner.left;
contentItem.anchors.right = tabInner.right;
}
}
ScrollView {
id: root
width: parent.width
height: parent.height
padding: 15
rightPadding: 20
contentWidth: availableWidth
contentHeight: tabInner.height
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
Theme {
id: theme
}
background: Rectangle {
color: 'transparent'
border.color: theme.tabBorder
border.width: 1
radius: 2
}
Column {
id: tabInner
anchors.left: parent.left
anchors.right: parent.right
}
}
}