qml UI fixes

This commit is contained in:
Evgenii Alekseev 2017-05-15 17:05:22 +03:00
parent 6b8244f3c4
commit 1afc33abef
2 changed files with 87 additions and 84 deletions

View File

@ -16,7 +16,7 @@
***************************************************************************/
import QtQuick 2.0
import QtQuick.Controls 2.0 as QtControls
import QtQuick.Controls 1.3 as QtControls
Item {
@ -29,9 +29,6 @@ Item {
QtControls.TextArea {
id: textArea
anchors.fill: parent
background: Rectangle {
color: "white"
}
textFormat: TextEdit.PlainText
Column {
@ -76,7 +73,7 @@ Item {
function changeTooltipPosition() {
tooltip.x = textArea.cursorRectangle.x
tooltip.y = textArea.cursorRectangle.y
tooltip.y = textArea.cursorRectangle.y + textArea.cursorRectangle.height
}
function getLastTag() {

View File

@ -18,6 +18,7 @@
import QtQuick 2.0
import QtQuick.Controls 1.3 as QtControls
import QtQuick.Dialogs 1.2 as QtDialogs
import QtQuick.Layouts 1.2 as QtLayouts
import org.kde.plasma.private.awesomewidget 1.0
@ -31,65 +32,70 @@ QtDialogs.Dialog {
id: awBugReporter
}
width: 480
height: 640
width: 640
height: 480
property bool debug: awActions.isDebugEnabled()
title: i18n("Report a bug")
standardButtons: QtDialogs.StandardButton.Ok | QtDialogs.StandardButton.Cancel | QtDialogs.StandardButton.Reset
QtLayouts.ColumnLayout {
anchors.fill: parent
QtControls.TextField {
id: title
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
placeholderText: i18n("Report subject")
}
Column {
id: body
width: parent.width
anchors.top: title.bottom
anchors.bottom: parent.bottom
QtLayouts.ColumnLayout {
anchors.left: parent.left
anchors.right: parent.right
QtControls.GroupBox {
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
height: parent.height / 5
title: i18n("Description")
QtControls.TextArea {
id: description
width: parent.width
height: parent.height
anchors.fill: parent
textFormat: TextEdit.PlainText
}
}
QtControls.GroupBox {
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
height: parent.height / 5
title: i18n("Steps to reproduce")
QtControls.TextArea {
id: reproduce
width: parent.width
height: parent.height
anchors.fill: parent
textFormat: TextEdit.PlainText
}
}
QtControls.GroupBox {
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
height: parent.height / 5
title: i18n("Expected result")
QtControls.TextArea {
id: expected
width: parent.width
height: parent.height
anchors.fill: parent
textFormat: TextEdit.PlainText
}
}
QtControls.GroupBox {
width: parent.width
height: parent.height * 2 / 5
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
title: i18n("Logs")
QtLayouts.ColumnLayout {
anchors.fill: parent
Row {
id: debugCmdLabel
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
QtControls.Label {
width: parent.width * 2 / 5
horizontalAlignment: Text.AlignJustify
@ -98,26 +104,25 @@ QtDialogs.Dialog {
text: i18n("Use command")
}
QtControls.TextField {
id: customTime
width: parent.width * 3 / 5
readOnly: true
text: "QT_LOGGING_RULES=*=true plasmawindowed org.kde.plasma.awesomewidget"
}
}
QtControls.Button {
id: logButton
anchors.top: debugCmdLabel.bottom
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
text: i18n("Load log file")
onClicked: logPath.open()
}
QtControls.TextArea {
anchors.top: logButton.bottom
anchors.bottom: parent.bottom
id: logBody
width: parent.width
anchors.left: parent.left
anchors.right: parent.right
anchors.bottom: parent.bottom
textFormat: TextEdit.PlainText
}
}
QtDialogs.FileDialog {
id: logPath
@ -127,6 +132,7 @@ QtDialogs.Dialog {
}
}
}
}
onAccepted: {
if (debug) console.debug()