mirror of
https://github.com/monero-project/monero-gui.git
synced 2025-01-10 03:42:05 +02:00
SettingsLog: fix TextArea layout, border, scrollbar
This commit is contained in:
parent
bac833c1dd
commit
d2d4c21cde
@ -87,10 +87,17 @@ Window {
|
||||
anchors.margins: 35 * scaleRatio
|
||||
spacing: 20 * scaleRatio
|
||||
|
||||
RowLayout {
|
||||
id: content
|
||||
Layout.fillWidth: true
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
border.color: MoneroComponents.Style.inputBorderColorActive
|
||||
border.width: 1
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
@ -101,20 +108,12 @@ Window {
|
||||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
selectByKeyboard: true
|
||||
anchors.fill: parent
|
||||
font.family: "Ariel"
|
||||
font.family: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
wrapMode: TextEdit.Wrap
|
||||
readOnly: true
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
border.color: Qt.rgba(255, 255, 255, 0.25);
|
||||
border.width: 1
|
||||
radius: 4
|
||||
}
|
||||
function logCommand(msg){
|
||||
msg = log_color(msg, "lime");
|
||||
textArea.append(msg);
|
||||
@ -156,15 +155,7 @@ Window {
|
||||
}
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
// TODO: scrollbar always visible is buggy.
|
||||
// QT 5.9 introduces `policy: ScrollBar.AlwaysOn`
|
||||
contentItem.opacity: 1
|
||||
anchors.top: flickable.top
|
||||
anchors.left: flickable.right
|
||||
anchors.leftMargin: 10 * scaleRatio
|
||||
anchors.bottom: flickable.bottom
|
||||
}
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -138,30 +138,34 @@ Rectangle {
|
||||
text: qsTr("Daemon log") + translationManager.emptyString
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
Item {
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: 240 * scaleRatio
|
||||
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
color: "transparent"
|
||||
border.color: MoneroComponents.Style.inputBorderColorActive
|
||||
border.width: 1
|
||||
radius: 4
|
||||
}
|
||||
|
||||
Flickable {
|
||||
id: flickable
|
||||
anchors.fill: parent
|
||||
|
||||
TextArea.flickable: TextArea {
|
||||
id : consoleArea
|
||||
anchors.fill: parent
|
||||
color: MoneroComponents.Style.defaultFontColor
|
||||
selectionColor: MoneroComponents.Style.dimmedFontColor
|
||||
textFormat: TextEdit.RichText
|
||||
selectByMouse: true
|
||||
selectByKeyboard: true
|
||||
font.family: "Ariel"
|
||||
font.family: MoneroComponents.Style.defaultFontColor
|
||||
font.pixelSize: 14 * scaleRatio
|
||||
wrapMode: TextEdit.Wrap
|
||||
readOnly: true
|
||||
background: Rectangle {
|
||||
color: "transparent"
|
||||
anchors.fill: parent
|
||||
border.color: Qt.rgba(255, 255, 255, 0.25);
|
||||
border.width: 1
|
||||
radius: 4
|
||||
}
|
||||
function logCommand(msg){
|
||||
msg = log_color(msg, "lime");
|
||||
consoleArea.append(msg);
|
||||
@ -203,14 +207,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
|
||||
ScrollBar.vertical: ScrollBar {
|
||||
// TODO: scrollbar always visible is buggy.
|
||||
// QT 5.9 introduces `policy: ScrollBar.AlwaysOn`
|
||||
contentItem.opacity: 1
|
||||
anchors.top: flickable.top
|
||||
anchors.left: flickable.right
|
||||
anchors.leftMargin: 10 * scaleRatio
|
||||
anchors.bottom: flickable.bottom
|
||||
ScrollBar.vertical: ScrollBar {}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user