diff --git a/resources/translations/da_DK.ts b/resources/translations/da_DK.ts index 84727b8..e5dcf63 100644 --- a/resources/translations/da_DK.ts +++ b/resources/translations/da_DK.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 is %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Press and hold the Home button or use the Web Configurator to configure the page diff --git a/resources/translations/de_CH.ts b/resources/translations/de_CH.ts index 1583736..a395026 100644 --- a/resources/translations/de_CH.ts +++ b/resources/translations/de_CH.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 ist %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Heb d Home-Taschte drückt oder bruch dr Web-Konfigurator für d Siite ds konfiguriere diff --git a/resources/translations/de_DE.ts b/resources/translations/de_DE.ts index 9f2eac1..f4abd9b 100644 --- a/resources/translations/de_DE.ts +++ b/resources/translations/de_DE.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 ist %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Um die Seite zu anzupassen, Home-Taste gedrückt halten oder Web-Konfigurator verwenden diff --git a/resources/translations/en_US.ts b/resources/translations/en_US.ts index d7a22a8..7a47f5c 100644 --- a/resources/translations/en_US.ts +++ b/resources/translations/en_US.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation diff --git a/resources/translations/fr_FR.ts b/resources/translations/fr_FR.ts index 9467c74..1383746 100644 --- a/resources/translations/fr_FR.ts +++ b/resources/translations/fr_FR.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 est %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Appuyez et maintenez le bouton Accueil ou utilisez le configurateur web pour configurer la page diff --git a/resources/translations/hu_HU.ts b/resources/translations/hu_HU.ts index ba0abe6..e19c84a 100644 --- a/resources/translations/hu_HU.ts +++ b/resources/translations/hu_HU.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 is %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Press and hold the Home button or use the Web Configurator to configure the page diff --git a/resources/translations/it_IT.ts b/resources/translations/it_IT.ts index bf8d75d..eb48dbc 100644 --- a/resources/translations/it_IT.ts +++ b/resources/translations/it_IT.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 is %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Tieni premuto il pulsante Home o usa il configuratore Web per configurare la pagina diff --git a/resources/translations/nl_NL.ts b/resources/translations/nl_NL.ts index 2f39c99..3bf9ac1 100644 --- a/resources/translations/nl_NL.ts +++ b/resources/translations/nl_NL.ts @@ -1446,13 +1446,13 @@ Climate fan Page - + %1 is %2 Used to show the entity state: %1 is the entity name, %2 is the state %1 is %2 - + Press and hold the Home button or use the Web Configurator to configure the page Web configurator is the name of the application, does not need translation Houd de Home-knop ingedrukt of gebruik de webconfigurator om de pagina te configureren diff --git a/src/qml/components/Page.qml b/src/qml/components/Page.qml index 4fcf5ab..6456a54 100644 --- a/src/qml/components/Page.qml +++ b/src/qml/components/Page.qml @@ -25,11 +25,16 @@ ListView { model: visualModel header: header currentIndex: 0 + + // Disable scrolling when no items on page, otherwise header is movable + interactive: visualModel.count property string title: pageName property string _id: pageId property QtObject items: pageItems property bool isCurrentItem: ListView.isCurrentItem + property int headerHeight: 260 + Behavior on height { NumberAnimation { easing.type: Easing.OutExpo; duration: 200 } @@ -65,6 +70,17 @@ ListView { } } } + onContentYChanged: { + // Adjust the height of the header image based on overscroll + if (contentY < -260){ + headerHeight= Math.max(-contentY, 260); + // Return the header to its normal size when we release + if (!dragging){ + contentY = -260; + } + } + + } DelegateModel { id: visualModel @@ -81,7 +97,7 @@ ListView { Image { id: headerImage - width: parent.width; height: 260 + width: parent.width; height: headerHeight source: resource.getBackgroundImage(pageImage) sourceSize.width: parent.width sourceSize.height: 260 @@ -248,7 +264,6 @@ ListView { onReleased: { page.interactive = true; - if (held) { Haptic.play(Haptic.Click); held = false; @@ -361,3 +376,4 @@ ListView { } } } +