Added scrollbars for lists and text fields. Added saving to the path settings for configuration files and the current language. Various UI improvements
This commit is contained in:
@@ -4,17 +4,27 @@ import QtQuick.Layouts 1.12
|
||||
|
||||
import Controls 1.0 as Controls
|
||||
import Cubo 1.0
|
||||
import Utils 1.0
|
||||
|
||||
ColumnLayout {
|
||||
spacing: 20
|
||||
|
||||
Controls.Frame {
|
||||
ScrollView {
|
||||
Flickable {
|
||||
id: outputFlickable
|
||||
clip: true
|
||||
anchors.fill: parent
|
||||
Controls.TextArea {
|
||||
boundsBehavior: Flickable.StopAtBounds
|
||||
|
||||
TextArea.flickable: Controls.TextArea {
|
||||
id: outputArea
|
||||
textFormat: Text.RichText
|
||||
}
|
||||
|
||||
ScrollBar.horizontal: Controls.ScrollBar { }
|
||||
ScrollBar.vertical: Controls.ScrollBar { }
|
||||
}
|
||||
|
||||
Layout.fillWidth: true
|
||||
Layout.fillHeight: true
|
||||
}
|
||||
@@ -27,9 +37,27 @@ ColumnLayout {
|
||||
|
||||
Connections {
|
||||
target: BmsInterface
|
||||
onStatusMessage: printMessage(msg, isGood)
|
||||
}
|
||||
|
||||
onStatusMessage: {
|
||||
outputArea.append(msg)
|
||||
function printMessage(msg, isGood) {
|
||||
var message = ""
|
||||
|
||||
if (!isGood) {
|
||||
message += "<font color=\"" + Palette.invalidColor + "\">"
|
||||
}
|
||||
|
||||
message += new Date().toLocaleString(Qt.locale("en-US"), "dd.MM.yyyy hh:mm:ss") + ": " + msg
|
||||
|
||||
if (!isGood) {
|
||||
message += "</font>"
|
||||
}
|
||||
|
||||
message += "<br>"
|
||||
|
||||
outputArea.insert(outputArea.length, message)
|
||||
outputArea.cursorPosition = outputArea.length
|
||||
|
||||
outputFlickable.contentX = 0
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user