From f125b6d60e573d6948b906f4f28213e6a2d9fba0 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 9 Dec 2019 12:27:40 -0400 Subject: [PATCH] Minor DebugConsole improvements Startup animation, top position by default, add F1 shortcut --- src/python/config_files.py | 2 +- src/qml/DebugConsole.qml | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/python/config_files.py b/src/python/config_files.py index 85a630c5..342a06b6 100644 --- a/src/python/config_files.py +++ b/src/python/config_files.py @@ -118,7 +118,7 @@ class UISettings(JSONConfigFile): }, "keys": { "startPythonDebugger": ["Alt+Shift+D"], - "toggleDebugConsole": ["Alt+Shift+C"], + "toggleDebugConsole": ["Alt+Shift+C", "F1"], "reloadConfig": ["Alt+Shift+R"], "zoomIn": ["Ctrl++"], diff --git a/src/qml/DebugConsole.qml b/src/qml/DebugConsole.qml index 834ca0b3..a7791851 100644 --- a/src/qml/DebugConsole.qml +++ b/src/qml/DebugConsole.qml @@ -6,13 +6,14 @@ import "utils.js" as Utils HDrawer { id: debugConsole - edge: Qt.BottomEdge + edge: Qt.TopEdge x: horizontal ? 0 : referenceSizeParent.width / 2 - width / 2 y: vertical ? 0 : referenceSizeParent.height / 2 - height / 2 width: horizontal ? calculatedSize : Math.min(window.width, 720) height: vertical ? calculatedSize : Math.min(window.width, 480) normalSize: 360 z: 9999 + position: 0 property var target: null property alias t: debugConsole.target @@ -41,13 +42,13 @@ HDrawer { Component.onCompleted: { mainUI.shortcuts.debugConsole = debugConsole + forceActiveFocus() + position = 1 commandsView.model.insert(0, { input: "t = " + String(target), output: "", error: false, }) - visible = true - forceActiveFocus() } onHistoryEntryChanged: