diff options
author | Adrian Kummerlaender | 2015-08-30 18:27:23 +0200 |
---|---|---|
committer | Adrian Kummerlaender | 2015-08-30 18:27:23 +0200 |
commit | 3aae7ad1ec8dcde6b41123f1f9166a6c2365251f (patch) | |
tree | acfee5e54c93a4aee544a8fdd412c4d7a34e31e2 /src/command | |
parent | a8963d496108685bcc0fbf06ec869f7d920fe2fc (diff) | |
download | MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar.gz MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar.bz2 MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar.lz MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar.xz MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.tar.zst MetaTerm-3aae7ad1ec8dcde6b41123f1f9166a6c2365251f.zip |
Make command output selectable and rich by default
Diffstat (limited to 'src/command')
-rw-r--r-- | src/command/CommandInput.qml | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/src/command/CommandInput.qml b/src/command/CommandInput.qml index 3e6c46c..502f0ae 100644 --- a/src/command/CommandInput.qml +++ b/src/command/CommandInput.qml @@ -84,7 +84,7 @@ Item { } } - Text { + TextEdit { id: output Layout.fillWidth: true @@ -95,10 +95,18 @@ Item { pointSize: settings.command.fontSize } - color: settings.command.fontColor + color: settings.command.fontColor + selectionColor: settings.command.fontColor + selectedTextColor: settings.command.background + + selectByMouse: true + readOnly: true + + textFormat: TextEdit.RichText + wrapMode: TextEdit.NoWrap function isInitial() { - return text === ''; + return length === 0; } function initialize() { @@ -109,7 +117,7 @@ Item { if ( isInitial() ) { text = msg; } else { - text += '<br/>' + msg; + text += '\n' + msg; } } |