gui: procs output panel resizable and toggle-able
- SplitView allows dragging the divider between process list and output - Show/Hide Output button toggles output panel visibility - View Output and double-click auto-show the panel if hidden
This commit is contained in:
parent
9b8715d625
commit
cc56fda862
|
|
@ -14,6 +14,7 @@ Window {
|
|||
property var procs: []
|
||||
property string outputText: ""
|
||||
property int selectedPid: -1
|
||||
property bool outputVisible: true
|
||||
|
||||
// Track the session we're displaying (synced from main window)
|
||||
property string currentSessionId: ollie.activeSessionId
|
||||
|
|
@ -106,12 +107,18 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
// Resizable split between process list and output
|
||||
SplitView {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
orientation: Qt.Vertical
|
||||
|
||||
// Process list
|
||||
ListView {
|
||||
id: procList
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 180
|
||||
Layout.minimumHeight: 100
|
||||
SplitView.fillWidth: true
|
||||
SplitView.minimumHeight: 80
|
||||
SplitView.preferredHeight: 180
|
||||
model: procs
|
||||
clip: true
|
||||
|
||||
|
|
@ -129,6 +136,7 @@ Window {
|
|||
selectedPid = modelData.pid
|
||||
var out = ollie.procOutput(currentSessionId, currentAgentId, selectedPid)
|
||||
outputText = out.length > 0 ? out : "(no output)"
|
||||
outputVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -195,11 +203,13 @@ Window {
|
|||
}
|
||||
}
|
||||
|
||||
// Output pane (always visible)
|
||||
// Output pane (toggle-able)
|
||||
GroupBox {
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
Layout.minimumHeight: 100
|
||||
id: outputPane
|
||||
visible: outputVisible
|
||||
SplitView.fillWidth: true
|
||||
SplitView.fillHeight: true
|
||||
SplitView.minimumHeight: 60
|
||||
title: selectedPid > 0 ? "Output (PID " + selectedPid + ")" : "Output"
|
||||
|
||||
ScrollView {
|
||||
|
|
@ -216,6 +226,7 @@ Window {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Action buttons
|
||||
RowLayout {
|
||||
|
|
@ -236,9 +247,16 @@ Window {
|
|||
outputText = ""
|
||||
var out = ollie.procOutput(currentSessionId, currentAgentId, selectedPid)
|
||||
outputText = out.length > 0 ? out : "(no output)"
|
||||
outputVisible = true
|
||||
}
|
||||
}
|
||||
|
||||
Button {
|
||||
text: outputVisible ? "Hide Output" : "Show Output"
|
||||
icon.name: outputVisible ? "go-up" : "go-down"
|
||||
onClicked: outputVisible = !outputVisible
|
||||
}
|
||||
|
||||
Item { Layout.fillWidth: true }
|
||||
|
||||
Button {
|
||||
|
|
|
|||
Loading…
Reference in New Issue