feature/custom-drawer (#563)
Replaced all the DrawerType with DrawerType2
This commit is contained in:
parent
fd030a5fd4
commit
074562b141
35 changed files with 1331 additions and 1319 deletions
|
@ -5,7 +5,7 @@ import QtQuick.Layouts
|
|||
import "../Controls2"
|
||||
import "../Controls2/TextTypes"
|
||||
|
||||
DrawerType {
|
||||
DrawerType2 {
|
||||
id: root
|
||||
|
||||
property string headerText
|
||||
|
@ -16,23 +16,24 @@ DrawerType {
|
|||
property var yesButtonFunction
|
||||
property var noButtonFunction
|
||||
|
||||
width: parent.width
|
||||
height: content.implicitHeight + 32
|
||||
|
||||
ColumnLayout {
|
||||
expandedContent: ColumnLayout {
|
||||
id: content
|
||||
|
||||
anchors.top: parent.top
|
||||
anchors.left: parent.left
|
||||
anchors.right: parent.right
|
||||
anchors.topMargin: 16
|
||||
anchors.rightMargin: 16
|
||||
anchors.leftMargin: 16
|
||||
|
||||
spacing: 8
|
||||
|
||||
onImplicitHeightChanged: {
|
||||
root.expandedHeight = content.implicitHeight + 32
|
||||
}
|
||||
|
||||
Header2TextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
text: headerText
|
||||
}
|
||||
|
@ -40,6 +41,8 @@ DrawerType {
|
|||
ParagraphTextType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 8
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
text: descriptionText
|
||||
}
|
||||
|
@ -47,6 +50,8 @@ DrawerType {
|
|||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.topMargin: 16
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
text: yesButtonText
|
||||
|
||||
|
@ -59,6 +64,8 @@ DrawerType {
|
|||
|
||||
BasicButtonType {
|
||||
Layout.fillWidth: true
|
||||
Layout.rightMargin: 16
|
||||
Layout.leftMargin: 16
|
||||
|
||||
defaultColor: "transparent"
|
||||
hoveredColor: Qt.rgba(1, 1, 1, 0.08)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue