Skip to content
Snippets Groups Projects
Commit 080b6b4c authored by akiraohgaki's avatar akiraohgaki
Browse files

Add toggle action for detailed content

parent 7f80b141
No related branches found
No related tags found
No related merge requests found
...@@ -13,8 +13,12 @@ ColumnLayout { ...@@ -13,8 +13,12 @@ ColumnLayout {
property alias icon: icon.source property alias icon: icon.source
property alias primaryText: primaryText.text property alias primaryText: primaryText.text
property alias informativeText: informativeText.text property alias informativeText: informativeText.text
property alias detailsVisible: details.visible
property alias detailedText: detailedText.text property alias detailedText: detailedText.text
property alias content: content.children property alias detailedContent: detailedContent.children
property alias actionButton: actionButton
property alias acceptButton: acceptButton property alias acceptButton: acceptButton
property alias rejectButton: rejectButton property alias rejectButton: rejectButton
...@@ -26,6 +30,10 @@ ColumnLayout { ...@@ -26,6 +30,10 @@ ColumnLayout {
dialog.visible = false; dialog.visible = false;
} }
function toggleDetails() {
details.visible = details.visible ? false : true;
}
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 12 spacing: 12
...@@ -48,6 +56,7 @@ ColumnLayout { ...@@ -48,6 +56,7 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WrapAnywhere wrapMode: Text.WrapAnywhere
font.bold: true font.bold: true
font.pixelSize: 14
} }
Label { Label {
id: informativeText id: informativeText
...@@ -59,27 +68,34 @@ ColumnLayout { ...@@ -59,27 +68,34 @@ ColumnLayout {
} }
} }
Label { ColumnLayout {
id: detailedText id: details
text: "" visible: false
visible: text ? true : false
Layout.fillWidth: true Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
color: "#444444"
}
Item {
id: content
Layout.fillWidth: true
}
Item {
Layout.fillHeight: true Layout.fillHeight: true
spacing: 12
Label {
id: detailedText
text: ""
visible: text ? true : false
Layout.fillWidth: true
wrapMode: Text.WrapAnywhere
}
Item {
id: detailedContent
visible: children ? true : false
Layout.fillWidth: true
}
} }
RowLayout { RowLayout {
Layout.fillWidth: true Layout.fillWidth: true
spacing: 4 spacing: 4
Button {
id: actionButton
text: ""
visible: text ? true : false
}
Item { Item {
Layout.fillWidth: true Layout.fillWidth: true
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment