Implemented a screen displaying the history of operations with the board. Added dialogs for displaying messages and statuses
This commit is contained in:
@@ -46,7 +46,8 @@ ComboBox {
|
||||
}
|
||||
|
||||
onPaint: {
|
||||
context.reset();
|
||||
var context = getContext("2d")
|
||||
context.reset()
|
||||
|
||||
if (control.down) {
|
||||
context.moveTo(0, height);
|
||||
@@ -77,7 +78,10 @@ ComboBox {
|
||||
background: Rectangle {
|
||||
implicitWidth: 120
|
||||
implicitHeight: 46
|
||||
color: control.down ? Palette.selectedBackgroundColor : Palette.backgroundColor
|
||||
color: control.enabled
|
||||
? (control.down ? Palette.selectedBackgroundColor : Palette.backgroundColor)
|
||||
: Palette.hoveredBackgroundColor
|
||||
|
||||
border.color: Palette.borderColor
|
||||
border.width: 1
|
||||
radius: 5
|
||||
|
||||
8
qml/Controls/DialogBackground.qml
Normal file
8
qml/Controls/DialogBackground.qml
Normal file
@@ -0,0 +1,8 @@
|
||||
import QtQuick 2.12
|
||||
|
||||
import Utils 1.0
|
||||
|
||||
Rectangle {
|
||||
color: Palette.screenBackgroundColor
|
||||
radius: 6
|
||||
}
|
||||
75
qml/Controls/DialogHeader.qml
Normal file
75
qml/Controls/DialogHeader.qml
Normal file
@@ -0,0 +1,75 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import QtQuick.Layouts 1.12
|
||||
|
||||
import Controls 1.0 as Controls
|
||||
import Utils 1.0
|
||||
|
||||
Rectangle {
|
||||
color: Qt.darker(Palette.hoveredBackgroundColor, 1.05)
|
||||
height: 50
|
||||
radius: 6
|
||||
|
||||
property Dialog dialog: undefined
|
||||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
|
||||
Controls.SubtitleLabel {
|
||||
text: root.title
|
||||
leftPadding: 20
|
||||
topPadding: 0
|
||||
bottomPadding: 0
|
||||
verticalAlignment: Text.AlignVCenter
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: parent.height
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
|
||||
property int lastX: 0
|
||||
property int lastY: 0
|
||||
|
||||
onPressed: {
|
||||
lastX = mouse.x
|
||||
lastY = mouse.y
|
||||
}
|
||||
|
||||
onPositionChanged:{
|
||||
var deltaX = mouse.x - lastX
|
||||
dialog.x += deltaX
|
||||
lastX = mouse.x - deltaX
|
||||
|
||||
var deltaY = mouse.y - lastY
|
||||
dialog.y += deltaY
|
||||
lastY = mouse.y - deltaY
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Image {
|
||||
id: closeImage
|
||||
source: "qrc:/Icons/close.svg"
|
||||
sourceSize.width: 36
|
||||
sourceSize.height: 36
|
||||
Layout.rightMargin: 10
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
|
||||
onPressed: {
|
||||
closeImage.sourceSize.width = 32
|
||||
closeImage.sourceSize.height = 32
|
||||
}
|
||||
onReleased: {
|
||||
closeImage.sourceSize.width = 36
|
||||
closeImage.sourceSize.height = 36
|
||||
}
|
||||
onClicked: {
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,3 +20,5 @@ TabButton 1.0 TabButton.qml
|
||||
TabBar 1.0 TabBar.qml
|
||||
ChartView 1.0 ChartView.qml
|
||||
TextArea 1.0 TextArea.qml
|
||||
DialogHeader 1.0 DialogHeader.qml
|
||||
DialogBackground 1.0 DialogBackground.qml
|
||||
|
||||
Reference in New Issue
Block a user