forked from fibercrypto/fibercryptowallet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[qml][settings] Add PanelItem for Accordion of settings
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import QtQuick 2.7 | ||
import QtQuick.Layouts 1.2 | ||
import QtQuick.Controls.Material 2.12 | ||
|
||
Column { | ||
id: root | ||
property string title: "Accordion" | ||
default property alias item: ld.sourceComponent | ||
Rectangle { | ||
width: columnSettings.width | ||
height: 40 | ||
color: Material.color(Material.Blue) | ||
MouseArea { | ||
anchors.fill: parent | ||
onClicked: info.show = !info.show | ||
} | ||
Text { | ||
anchors.fill: parent | ||
anchors.margins: 10 | ||
horizontalAlignment: Text.AlignHCenter | ||
verticalAlignment: Text.AlignVCenter | ||
text: root.title | ||
} | ||
Text { | ||
anchors{ | ||
right: parent.right | ||
top: parent.top | ||
bottom: parent.bottom | ||
margins: 10 | ||
} | ||
horizontalAlignment: Text.AlignRight | ||
verticalAlignment: Text.AlignVCenter | ||
text: "^" | ||
rotation: info.show ? 0 : "180" | ||
} | ||
|
||
} | ||
Rectangle { | ||
id: info | ||
width: 200 | ||
height: show ? ld.height : 0 | ||
property bool show : false | ||
// color: generalStackView.color // TODO Set proper color | ||
clip: true | ||
Loader { | ||
id: ld | ||
y: info.height - height | ||
anchors.horizontalCenter: info.horizontalCenter | ||
} | ||
Behavior on height { | ||
NumberAnimation { duration: 200; easing.type: Easing.InOutQuad } | ||
} | ||
} | ||
} |
Empty file.
Empty file.