diff --git a/qml/Components/ChooserLength.qml b/qml/Components/ChooserLength.qml
index ea84fe8a5e0285dfeb0c387c545990ad2dc45981..363d6c3358b08c8fc528b8eb1a79726c629afa39 100644
--- a/qml/Components/ChooserLength.qml
+++ b/qml/Components/ChooserLength.qml
@@ -46,6 +46,7 @@ Item {
title.text: model.text
icon.name: "ok"
icon.visible: selectedLeng === model.text
+
onClicked: {
selectedLeng = model.text;
lengSetting.toggleExpansion();
diff --git a/qml/Components/ChooserTheme.qml b/qml/Components/ChooserTheme.qml
index fd2eae621bceca531a3d5f9a8831840f52e13c7d..a082049c58a7a7d9069ab54ebfbb2f747bb9f5e4 100644
--- a/qml/Components/ChooserTheme.qml
+++ b/qml/Components/ChooserTheme.qml
@@ -31,6 +31,8 @@ Item {
? "Ambiance"
: "Suru Dark"
+ property string themeToBe
+
ListModel {
id: themeModel
Component.onCompleted: initialize()
@@ -44,19 +46,34 @@ Item {
ExpandableListItem {
id: themeSetting
- listViewHeight: themeModel.count*units.gu(6.1)
+ listViewHeight: themeModel.count * units.gu(6.1)
model: themeModel
title.text: selectedTheme
delegate: StandardListItem {
+ id: rrr
title.text: model.text
icon.name: "ok"
icon.visible: selectedTheme === model.text
+
onClicked: {
+ themeToBe = model.theme;
selectedTheme = model.text;
- theming.themeName = model.theme;
themeSetting.toggleExpansion();
+ themeTimer.start()
}
}
}
+
+ Timer {
+ id: themeTimer
+ //intervall needs to be a minimum of 200, otherwise toggleExpansion is not entirely finished
+ interval: 175
+ running: false
+ repeat: false
+
+ onTriggered: {
+ theming.themeName = themeToBe
+ }
+ }
}
diff --git a/qml/Components/ExpandableListItem.qml b/qml/Components/ExpandableListItem.qml
index afb997efd59a59a9d2eaec54f4ceb9e9b72a32d2..da714659f03c74ef94bdbdcf19ad4a36248765e0 100644
--- a/qml/Components/ExpandableListItem.qml
+++ b/qml/Components/ExpandableListItem.qml
@@ -42,6 +42,7 @@ ListItem {
height: expandableHeader.height + divider.height
divider.visible: false
expansion.height: contentColumn.height
+
onClicked: toggleExpansion()
function toggleExpansion() {
@@ -89,5 +90,11 @@ ListItem {
delegate: expandableListItem.delegate
}
}
+
+ Connections {
+ target: bottomEdge
+
+ onCollapseStarted: expansion.expanded = false;
+ }
}
diff --git a/qml/Components/KeyToEdit.qml b/qml/Components/KeyToEdit.qml
index 9905539d0cb05331d8f154130b0e70dd72ab82e5..91a6a9ad9f60061d9a05343ccff4695af2cacf2a 100644
--- a/qml/Components/KeyToEdit.qml
+++ b/qml/Components/KeyToEdit.qml
@@ -112,59 +112,65 @@ Column {
}
}
- Row {
+ Column {
width: parent.width
- spacing: units.gu(2)
- Text {
- anchors.top:parent.top
- anchors.topMargin: units.gu(2)
- id: algTxt
- text: i18n.tr("Algorithm")
- color: theme.palette.normal.overlayText
- }
+ Row {
+ width: parent.width
+ spacing: units.gu(2)
- ListItem {
- id: algTF
- width: parent.width - units.gu(2) - algTxt.width
- height: cAlg.height > 0 ? cAlg.height : units.gu(7)
- divider.visible: false
+ Text {
+ anchors.top: parent.top
+ anchors.topMargin: units.gu(2)
+ id: algTxt
+ text: i18n.tr("Algorithm")
+ color: theme.palette.normal.overlayText
+ }
- property string algorithm: "SHA1"
+ ListItem {
+ id: algTF
+ width: parent.width - units.gu(2) - algTxt.width
+ height: cAlg.height > 0 ? cAlg.height : units.gu(7)
+ divider.visible: false
- ChooserAlgorithm {
- id: cAlg
- width: parent.width
+ property string algorithm: "SHA1"
+
+ ChooserAlgorithm {
+ id: cAlg
+ width: parent.width
- onSelectedAlgChanged: algTF.algorithm = selectedAlg
+ onSelectedAlgChanged: algTF.algorithm = selectedAlg
+ }
}
}
- }
- Row {
- width: parent.width
- spacing: units.gu(2)
- Text {
- anchors.verticalCenter: parent.verticalCenter
- id: passLenTxt
- text: i18n.tr("Password Length")
- color: theme.palette.normal.overlayText
- }
+ Row {
+ width: parent.width
+ spacing: units.gu(2)
- ListItem {
- id: lengTF
- width: parent.width - units.gu(2) - passLenTxt.width
- height: cLeng.height > 0 ? cLeng.height : units.gu(7)
- divider.visible: false
+ Text {
+ anchors.top: parent.top
+ anchors.topMargin: units.gu(2)
+ id: passLenTxt
+ text: i18n.tr("Password Length")
+ color: theme.palette.normal.overlayText
+ }
- property string passwordLength: "6"
+ ListItem {
+ id: lengTF
+ width: parent.width - units.gu(2) - passLenTxt.width
+ height: cLeng.height > 0 ? cLeng.height : units.gu(7)
+ divider.visible: false
- ChooserLength {
- id: cLeng
- width: parent.width
+ property string passwordLength: "6"
+
+ ChooserLength {
+ id: cLeng
+ width: parent.width
- onSelectedLengChanged: lengTF.passwordLength = selectedLeng
+ onSelectedLengChanged: lengTF.passwordLength = selectedLeng
+ }
}
}
}
diff --git a/qml/Components/PageEditAddKey.qml b/qml/Components/PageEditAddKey.qml
index 60d1a0ca01f466a3674b33bcb2cf98aa3c30eba0..ffc4440f2717e25faf3adf9417c0941584ed33da 100644
--- a/qml/Components/PageEditAddKey.qml
+++ b/qml/Components/PageEditAddKey.qml
@@ -11,16 +11,10 @@ Page {
id: editAddKeyPage
property var uriJson
- /*
- property string authType: keyPeriod.visible
- ? "TOTP"
- : "HTOP"*/
- //title: i18n.tr("Add Authenticator Key")
- //text: i18n.tr("%1 authenticator key").arg(authType)
+
header: HeaderBase {
id: pageHeader
title: i18n.tr("Key Information")
- //flickable: editAddFlickable
}
ScrollView {
diff --git a/qml/Components/PageSettings.qml b/qml/Components/PageSettings.qml
index 95489bebb30b271a3e0c6362676d57c8a9a66c58..8448e7c2d59d2aaf7dd8916bba308ff35e5b64bd 100644
--- a/qml/Components/PageSettings.qml
+++ b/qml/Components/PageSettings.qml
@@ -49,7 +49,9 @@ Page {
ListItem {
id: themeTF
width: parent.width
- height: cTheme.height > 0 ? cTheme.height : units.gu(7)
+ height: cTheme.height > 0
+ ? cTheme.height
+ : units.gu(7)
divider.visible: false
property string themeName: "TOTP"