aboutsummaryrefslogtreecommitdiff
path: root/src/widget/HistoryViewer.qml
blob: 7f79c3c15b522e989d16aad554d4323487cc74eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import QtQuick 2.0
import QMLTermWidget 1.0
import QtQuick.Layouts 1.1

Item {
	id: item

	property string history

	height: viewer.height
	width:  parent.width - settings.terminal.frameWidth

	TextEdit {
		id: viewer

		anchors {
			left:  parent.left
			leftMargin: settings.terminal.frameWidth
			right: parent.right
		}

		Layout.fillWidth: true

		font {
			family:    settings.terminal.fontFamily
			pointSize: settings.terminal.fontSize
		}

		color:             settings.item.fontColor
		selectionColor:    settings.item.fontColor
		selectedTextColor: settings.window.background

		selectByMouse: true
		readOnly:      true

		wrapMode: TextEdit.Wrap

		text: history.trim()
	}
}