2import org.mauikit.controls 1.3 as Maui
3import org.mauikit.terminal 1.0 as Term
4import QtQuick.Controls 2.14
9 property Term.QMLTermWidget terminal
10 onTerminalChanged: terminalProxyFlickable.updateFromTerminal()
12 property int highlightLine : -1
16 id: terminalProxyFlickable
24 height: kterminal.fontHeight()
25 color: Maui.Theme.highlightColor
27 y: Math.floor(height * control.highlightLine)
28 visible: control.highlightLine > -1
31 property bool updating: false
33 function updateTerminal() {
34 if (!terminal) return;
37 terminal.scrollbarCurrentValue = contentY * terminal.scrollbarMaximum / (contentHeight - height);
41 function updateFromTerminal() {
42 if (!terminal)
return;
46 contentHeight = height * terminal.totalLines / terminal.lines;
47 contentY = (contentHeight - height) * terminal.scrollbarCurrentValue / terminal.scrollbarMaximum;
55 onContentYChanged: terminalProxyFlickable.updateTerminal()
59 function onScrollbarMaximumChanged ()
61 terminalProxyFlickable.updateFromTerminal()
64 function onScrollbarCurrentValueChanged()
66 terminalProxyFlickable.updateFromTerminal()
69 function onTotalLinesChanged()
71 terminalProxyFlickable.updateFromTerminal()
74 function onLinesChanged()
76 terminalProxyFlickable.updateFromTerminal()
82 Maui.Theme.colorSet:
Maui.Theme.Complementary
83 Maui.Theme.inherit:
false
86 width: visible ? implicitWidth : 0
87 x: control.width - width -
Maui.Style.space.small