40 lines
959 B
QML
40 lines
959 B
QML
import QtQuick 2.12
|
|
import QtQuick.Controls 2.12
|
|
import QtQuick.Layouts 1.12
|
|
|
|
RowLayout {
|
|
id: header
|
|
property string title: ""
|
|
signal back()
|
|
|
|
Layout.fillWidth: true
|
|
spacing: 8
|
|
|
|
Button {
|
|
text: "\u2190 Назад"
|
|
implicitHeight: 44
|
|
onClicked: header.back()
|
|
background: Rectangle {
|
|
implicitHeight: 44
|
|
radius: 4
|
|
color: parent.down ? "#3a3a54" : (parent.hovered ? "#353550" : "#2a2a40")
|
|
}
|
|
contentItem: Text {
|
|
text: parent.text
|
|
color: "#ffffff"
|
|
horizontalAlignment: Text.AlignHCenter
|
|
verticalAlignment: Text.AlignVCenter
|
|
}
|
|
}
|
|
Label {
|
|
Layout.fillWidth: true
|
|
text: header.title
|
|
font.bold: true
|
|
font.pixelSize: 16
|
|
color: "#ffffff"
|
|
horizontalAlignment: Text.AlignHCenter
|
|
elide: Text.ElideRight
|
|
}
|
|
Item { Layout.preferredWidth: 88 }
|
|
}
|