implement qml UI
This commit is contained in:
parent
1baf36282e
commit
8d36c31cb4
41 changed files with 7963 additions and 16 deletions
37
client/ui/qml/TitleBar.qml
Normal file
37
client/ui/qml/TitleBar.qml
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import "./"
|
||||
|
||||
Rectangle {
|
||||
id: root
|
||||
color: "#F5F5F5"
|
||||
width: GC.screenWidth
|
||||
height: 30
|
||||
signal closeButtonClicked()
|
||||
|
||||
Button {
|
||||
id: closeButton
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 5
|
||||
icon.source: "qrc:/images/close.png"
|
||||
icon.width: 16
|
||||
icon.height: 16
|
||||
width: height
|
||||
height: 20
|
||||
background: Item {}
|
||||
contentItem: Image {
|
||||
source: closeButton.icon.source
|
||||
anchors.fill: closeButton
|
||||
anchors.margins: ms.containsMouse ? 3 : 4
|
||||
}
|
||||
MouseArea {
|
||||
id: ms
|
||||
hoverEnabled: true
|
||||
anchors.fill: closeButton
|
||||
}
|
||||
onClicked: {
|
||||
root.closeButtonClicked()
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue