Skip to content

Commit 52b52b8

Browse files
committed
[ui] ScriptEditor: ScriptEditor gets a RowLayout
A Row Layout is more practical for using script editor with the current placement of meshroom GUI.
1 parent 31ad46c commit 52b52b8

File tree

1 file changed

+35
-38
lines changed

1 file changed

+35
-38
lines changed

meshroom/ui/qml/GraphEditor/ScriptEditor.qml

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -211,50 +211,16 @@ Item {
211211
}
212212
}
213213

214-
MSplitView {
215-
id: topBottomSplit
214+
RowLayout {
216215
Layout.fillHeight: true
217216
Layout.fillWidth: true
218-
219-
orientation: Qt.Vertical
220-
221-
// Output Text Area -- Shows the output for the executed script(s)
222-
Rectangle {
223-
id: outputArea
224-
225-
// Has a minimum height
226-
SplitView.minimumHeight: 80
227-
228-
color: palette.base
229-
230-
Flickable {
231-
width: parent.width
232-
height: parent.height
233-
contentWidth: width
234-
contentHeight: ( output.lineCount + 5 ) * output.font.pixelSize // + 5 lines for buffer to be scrolled and visibility
235-
236-
ScrollBar.vertical: MScrollBar {}
237-
238-
TextArea.flickable: TextArea {
239-
id: output
240-
241-
readOnly: true
242-
selectByMouse: true
243-
padding: 0
244-
Layout.fillHeight: true
245-
Layout.fillWidth: true
246-
wrapMode: Text.WordWrap
247-
248-
textFormat: Text.RichText
249-
}
250-
}
251-
}
217+
width: root.width
252218

253219
// Input Text Area -- Holds the input scripts to be executed
254220
Rectangle {
255221
id: inputArea
256-
257-
SplitView.fillHeight: true
222+
Layout.fillHeight: true
223+
Layout.fillWidth: true
258224

259225
color: palette.base
260226

@@ -342,6 +308,37 @@ Item {
342308
}
343309
}
344310

311+
// Output Text Area -- Shows the output for the executed script(s)
312+
Rectangle {
313+
id: outputArea
314+
Layout.fillHeight: true
315+
Layout.fillWidth: true
316+
317+
color: palette.base
318+
319+
Flickable {
320+
width: parent.width
321+
height: parent.height
322+
contentWidth: width
323+
contentHeight: ( output.lineCount + 5 ) * output.font.pixelSize // + 5 lines for buffer to be scrolled and visibility
324+
325+
ScrollBar.vertical: MScrollBar {}
326+
327+
TextArea.flickable: TextArea {
328+
id: output
329+
330+
readOnly: true
331+
selectByMouse: true
332+
padding: 0
333+
Layout.fillHeight: true
334+
Layout.fillWidth: true
335+
wrapMode: Text.WordWrap
336+
337+
textFormat: Text.RichText
338+
}
339+
}
340+
}
341+
345342
// Syntax Highlights for the Input Area for Python Based Syntax
346343
PySyntaxHighlighter {
347344
id: syntaxHighlighter

0 commit comments

Comments
 (0)