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

View File

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