Fix flickable pages keyboard scrolling

This commit is contained in:
miruka 2020-06-26 03:16:36 -04:00
parent 2e610cf167
commit 78c04e6404
4 changed files with 18 additions and 6 deletions

View File

@ -1,8 +1,6 @@
# TODO # TODO
- handle `{}` bad `DevicesResponse`
- delete devices (do that in key verification popup instead of blacklisting) - delete devices (do that in key verification popup instead of blacklisting)
- flickshortcuts
- avatar upload/change component - avatar upload/change component
- device list keyboard navigation - device list keyboard navigation
@ -17,7 +15,7 @@
- use new nio `restore_login()` - use new nio `restore_login()`
- verify all popups and boxes work: enter/esc, tab focus, operations - verify all popups and boxes work: enter/esc, tab focus, operations
- update nio fork, requirements.txt and flatpak nio version - update requirements.txt and flatpak nio version
## Refactoring ## Refactoring

View File

@ -1,6 +1,7 @@
// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12
import "../ShortcutBundles" import "../ShortcutBundles"
HPage { HPage {
@ -15,6 +16,9 @@ HPage {
property alias flickable: flickable property alias flickable: flickable
property alias flickShortcuts: flickShortcuts property alias flickShortcuts: flickShortcuts
property bool enableFlickShortcuts:
SwipeView ? SwipeView.isCurrentItem : true
padding: 0 padding: 0
@ -33,7 +37,7 @@ HPage {
FlickShortcuts { FlickShortcuts {
id: flickShortcuts id: flickShortcuts
active: ! mainUI.debugConsole.visible active: ! mainUI.debugConsole.visible && enableFlickShortcuts
flickable: flickable flickable: flickable
} }

View File

@ -1,10 +1,12 @@
// SPDX-License-Identifier: LGPL-3.0-or-later // SPDX-License-Identifier: LGPL-3.0-or-later
import QtQuick 2.12 import QtQuick 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.12 import QtQuick.Layouts 1.12
import "../../Base" import "../../Base"
import "../../Base/ButtonLayout" import "../../Base/ButtonLayout"
import "../../PythonBridge" import "../../PythonBridge"
import "../../ShortcutBundles"
HColumnPage { HColumnPage {
id: page id: page
@ -19,6 +21,9 @@ HColumnPage {
property string userId property string userId
property bool enableFlickShortcuts:
SwipeView ? SwipeView.isCurrentItem : true
property Future loadFuture: null property Future loadFuture: null
// property var pr: column.childrenRect.height // property var pr: column.childrenRect.height
@ -112,6 +117,12 @@ HColumnPage {
Layout.fillWidth: true Layout.fillWidth: true
Layout.fillHeight: true Layout.fillHeight: true
FlickShortcuts {
flickable: deviceList
active:
! mainUI.debugConsole.visible && page.enableFlickShortcuts
}
HLoader { HLoader {
id: busyIndicatorLoader id: busyIndicatorLoader
anchors.centerIn: parent anchors.centerIn: parent

View File

@ -57,8 +57,7 @@ HFlickableColumnPage {
} }
flickShortcuts.active: enableFlickShortcuts: ! chat.composerHasFocus
! mainUI.debugConsole.visible && ! chat.composerHasFocus
background: Rectangle { background: Rectangle {
color: theme.chat.roomPane.roomSettings.background color: theme.chat.roomPane.roomSettings.background