From e3fcb39556a729722f664b5e11434240fc5379e8 Mon Sep 17 00:00:00 2001 From: miruka Date: Mon, 28 Sep 2020 19:11:51 -0400 Subject: [PATCH] DebugConsole: improve text & border coloring --- src/gui/DebugConsole.qml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/gui/DebugConsole.qml b/src/gui/DebugConsole.qml index 4821c0cd..f8588d4b 100644 --- a/src/gui/DebugConsole.qml +++ b/src/gui/DebugConsole.qml @@ -181,20 +181,28 @@ HDrawer { width: outputList.width - outputList.leftMargin - outputList.rightMargin + readonly property color inputColor: + model.error ? theme.colors.errorText : + model.output ? theme.colors.accentText : + theme.colors.positiveText + text: `
` + - `` + + `` + utils.plain2Html(model.input) + "" + (model.input && model.output ? "
" : "") + (model.output ? utils.plain2Html(model.output) : "") + "
" + leftPadding: theme.spacing textFormat: HSelectableLabel.RichText wrapMode: HLabel.Wrap - color: model.error ? theme.colors.errorText : theme.colors.text font.family: theme.fontFamily.mono - leftPadding: theme.spacing + color: + model.error ? + Qt.darker(inputColor, 1.4) : + theme.colors.halfDimText Layout.fillWidth: true @@ -256,7 +264,9 @@ HDrawer { color: model.error ? theme.colors.negativeBackground : - theme.colors.accentElement + model.output ? + theme.colors.accentElement : + theme.colors.positiveBackground } }