Make DebugConsole keyboard-scrollable again

This commit is contained in:
miruka 2020-03-28 12:31:42 -04:00
parent 3f0241b7f1
commit 790229e188
5 changed files with 24 additions and 0 deletions

View File

@ -16,6 +16,7 @@ HPage {
contentHeight: column.childrenRect.height
FlickShortcuts {
enabled: ! mainUI.debugConsole.visible
flickable: flickable
}

View File

@ -4,6 +4,7 @@ import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Layouts 1.12
import "Base"
import "ShortcutBundles"
HDrawer {
id: debugConsole
@ -165,6 +166,11 @@ HDrawer {
}
}
FlickShortcuts {
enabled: debugConsole.visible
flickable: commandsView
}
Rectangle {
z: -10
anchors.fill: parent

View File

@ -70,6 +70,7 @@ Rectangle {
}
FlickShortcuts {
enabled: ! mainUI.debugConsole.visible
flickable: eventList
}

View File

@ -4,35 +4,45 @@ import QtQuick 2.12
import "../Base"
HQtObject {
id: root
property Item flickable: parent
property bool enabled: true
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollUp
onActivated: utils.flickPages(flickable, -1 / 10)
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollDown
onActivated: utils.flickPages(flickable, 1 / 10)
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollPageUp
onActivated: utils.flickPages(flickable, -1)
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollPageDown
onActivated: utils.flickPages(flickable, 1)
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollToTop
onActivated: utils.flickToTop(flickable)
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.scrollToBottom
onActivated: utils.flickToBottom(flickable)
}

View File

@ -4,10 +4,15 @@ import QtQuick 2.12
import "../Base"
HQtObject {
id: root
property Item container: parent
property bool enabled: true
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.previousTab
onActivated: container.setCurrentIndex(
utils.numberWrapAt(container.currentIndex - 1, container.count),
@ -15,6 +20,7 @@ HQtObject {
}
HShortcut {
enabled: root.enabled
sequences: window.settings.keys.nextTab
onActivated: container.setCurrentIndex(
utils.numberWrapAt(container.currentIndex + 1, container.count),