2import org.mauikit.controls as Maui
3import org.mauikit.terminal as Term
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()
35 if (!terminal) return;
38 terminal.scrollbarCurrentValue = contentY * terminal.scrollbarMaximum / (contentHeight - height);
42 function updateFromTerminal()
44 if (!terminal)
return;
48 contentHeight = height * terminal.totalLines / terminal.lines;
49 contentY = (contentHeight - height) * terminal.scrollbarCurrentValue / terminal.scrollbarMaximum;
57 onContentYChanged: terminalProxyFlickable.updateTerminal()
62 function onScrollbarMaximumChanged ()
64 terminalProxyFlickable.updateFromTerminal()
67 function onScrollbarCurrentValueChanged()
69 terminalProxyFlickable.updateFromTerminal()
72 function onTotalLinesChanged()
74 terminalProxyFlickable.updateFromTerminal()
77 function onLinesChanged()
79 terminalProxyFlickable.updateFromTerminal()
85 Maui.Theme.colorSet:
Maui.Theme.Complementary
86 Maui.Theme.inherit:
false
89 width: visible ? implicitWidth : 0
90 x: control.width - width -
Maui.Style.space.small