Remove obsolete Row; Enable animations; Change Hint

This commit is contained in:
John Gibbon 2021-01-02 19:55:41 +01:00 committed by Sebastian Wolf
parent 473c603451
commit 54602d8a6c
No known key found for this signature in database
GPG key ID: CEA9522B5F38A90A

View file

@ -70,7 +70,7 @@ Page {
Debug.log("Remaining interaction hints: " + remainingInteractionHints); Debug.log("Remaining interaction hints: " + remainingInteractionHints);
if (remainingInteractionHints > 0) { if (remainingInteractionHints > 0) {
interactionHintTimer.start(); interactionHintTimer.start();
titleInteractionHint.visible = true; titleInteractionHint.opacity = 1.0;
appSettings.remainingInteractionHints = remainingInteractionHints - 1; appSettings.remainingInteractionHints = remainingInteractionHints - 1;
} }
} }
@ -169,8 +169,8 @@ Page {
function resetFocus() { function resetFocus() {
if (chatSearchField.text === "") { if (chatSearchField.text === "") {
chatSearchField.visible = false; chatSearchField.opacity = 0.0;
pageHeader.visible = true; pageHeader.opacity = 1.0;
} }
chatSearchField.focus = false; chatSearchField.focus = false;
overviewPage.focus = true; overviewPage.focus = true;
@ -258,15 +258,11 @@ Page {
} }
} }
Row {
id: headerRow
width: parent.width
PageHeader { PageHeader {
id: pageHeader id: pageHeader
title: qsTr("Fernschreiber") title: qsTr("Fernschreiber")
leftMargin: Theme.itemSizeMedium leftMargin: Theme.itemSizeMedium
opacity: visible ? 1 : 0 visible: opacity > 0
Behavior on opacity { FadeAnimation {} } Behavior on opacity { FadeAnimation {} }
GlassItem { GlassItem {
@ -283,8 +279,8 @@ Page {
anchors.fill: parent anchors.fill: parent
onClicked: { onClicked: {
chatSearchField.focus = true; chatSearchField.focus = true;
chatSearchField.visible = true; chatSearchField.opacity = 1.0;
pageHeader.visible = false; pageHeader.opacity = 0.0;
} }
} }
@ -292,8 +288,8 @@ Page {
SearchField { SearchField {
id: chatSearchField id: chatSearchField
visible: false visible: opacity > 0
opacity: visible ? 1 : 0 opacity: 0
Behavior on opacity { FadeAnimation {} } Behavior on opacity { FadeAnimation {} }
width: parent.width width: parent.width
height: pageHeader.height height: pageHeader.height
@ -314,12 +310,10 @@ Page {
} }
} }
}
SilicaListView { SilicaListView {
id: chatListView id: chatListView
anchors { anchors {
top: headerRow.bottom top: pageHeader.bottom
bottom: parent.bottom bottom: parent.bottom
left: parent.left left: parent.left
right: parent.right right: parent.right
@ -375,16 +369,18 @@ Page {
running: false running: false
interval: 4000 interval: 4000
onTriggered: { onTriggered: {
titleInteractionHint.visible = false; titleInteractionHint.opacity = 0.0;
} }
} }
InteractionHintLabel { InteractionHintLabel {
id: titleInteractionHint id: titleInteractionHint
text: qsTr("Tap on the title bar to filter your chats") text: qsTr("Tap on the title bar to filter your chats")
visible: false visible: opacity > 0
invert: true
anchors.fill: parent
Behavior on opacity { FadeAnimation {} } Behavior on opacity { FadeAnimation {} }
opacity: visible ? 1 : 0 opacity: 0
} }
} }