Event context menu entry to open debug console

Replaces the hidden double-click-on-empty-space feature
This commit is contained in:
miruka 2019-12-20 10:39:10 -04:00
parent 9bd739a0db
commit be61a34ec0
4 changed files with 11 additions and 5 deletions

View File

@ -5,7 +5,6 @@ import QtQuick.Controls 2.12
HMenuItem {
onTriggered: {
print( parent.parent.parent)
menu.focusOnClosed = null
utils.makePopup(

View File

@ -46,11 +46,8 @@ HRowLayout {
// ~600px max with a 16px font
readonly property int maxMessageWidth: theme.fontSize.normal * 0.5 * 75
readonly property alias debugConsoleLoader: debugConsoleLoader
TapHandler {
enabled: debugMode
onDoubleTapped: debugConsoleLoader.toggle()
}
DebugConsoleLoader {
id: debugConsoleLoader

View File

@ -170,6 +170,13 @@ HColumnLayout {
Clipboard.text = selectableLabelContainer.joinedSelection
}
HMenuItem {
icon.name: "debug"
text: qsTr("Debug this event")
visible: debugMode
onTriggered: eventContent.debugConsoleLoader.toggle()
}
HMenuItemPopupSpawner {
icon.name: "clear-messages"
text: qsTr("Clear messages")

3
src/icons/thin/debug.svg Normal file
View File

@ -0,0 +1,3 @@
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">
<path d="m7.074 1.408c0-.778.641-1.408 1.431-1.408.942 0 1.626.883 1.38 1.776-.093.336-.042.695.138.995.401.664 1.084 1.073 1.977 1.078.88-.004 1.572-.408 1.977-1.078.181-.299.23-.658.139-.995-.247-.892.435-1.776 1.379-1.776.79 0 1.431.63 1.431 1.408 0 .675-.482 1.234-1.117 1.375-.322.071-.6.269-.77.548-.613 1.017.193 1.917.931 2.823-1.211.562-2.525.846-3.97.846-1.468 0-2.771-.277-3.975-.84.748-.92 1.555-1.803.935-2.83-.168-.279-.446-.477-.768-.548-.636-.14-1.118-.699-1.118-1.374zm3.926 7.531c-1.709-.135-3.271-.599-4.703-1.435-.217.359-.421.738-.601 1.146-.227.514-.646.552-.941.437l-2.295-.89c-.542-.21-1.153.051-1.367.584-.213.533.053 1.136.594 1.346l2.231.866c.496.192.854.694.773 1.274-.106.758-.683 1.111-1.235 1.111h-2.402c-.582 0-1.054.464-1.054 1.037s.472 1.037 1.054 1.037h2.387c.573 0 1.159.372 1.265 1.057.112.728-.228 1.229-.751 1.462l-2.42 1.078c-.53.236-.766.851-.526 1.373s.865.753 1.395.518l2.561-1.14c.307-.137.688-.106.901.259.922 1.587 2.674 3.361 5.134 3.941zm9.559 6.513h2.387c.583 0 1.055-.464 1.055-1.037s-.472-1.037-1.055-1.037h-2.402c-.574 0-1.137-.393-1.227-1.052-.092-.677.286-1.147.766-1.333l2.23-.866c.541-.21.808-.813.594-1.346-.213-.533-.825-.795-1.367-.584l-2.294.891c-.329.127-.734.036-.926-.401-.185-.423-.396-.816-.62-1.188-1.433.829-3.008 1.3-4.699 1.439v15.062c2.406-.567 4.134-2.284 5.072-3.837.262-.432.629-.514.964-.364l2.561 1.14c.528.236 1.154.005 1.395-.518.239-.522.005-1.137-.526-1.373l-2.42-1.078c-.494-.221-.867-.738-.764-1.383.128-.803.717-1.135 1.276-1.135z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB