Settings page was added
This commit is contained in:
@@ -5,6 +5,7 @@ Drawer {
|
||||
property alias logo: logoImage.source
|
||||
property alias appName: appNameLabel.text
|
||||
property alias model: menuRepeater.model
|
||||
property alias connected: connectionLabel.connected
|
||||
|
||||
signal actionSelected(var action)
|
||||
|
||||
@@ -26,12 +27,23 @@ Drawer {
|
||||
anchors.margins: 10
|
||||
}
|
||||
|
||||
Label {
|
||||
id: appNameLabel
|
||||
|
||||
Column {
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
font.pointSize: 20
|
||||
text: qsTr("BeerLog v0.1")
|
||||
|
||||
Label {
|
||||
id: appNameLabel
|
||||
|
||||
font.pointSize: 20
|
||||
}
|
||||
|
||||
Label {
|
||||
id: connectionLabel
|
||||
|
||||
property bool connected: false
|
||||
|
||||
text: connected ? qsTr("Online") : qsTr("Offline")
|
||||
color: connected ? "green" : "red"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
24
qml/Components/SubtitledItemDelegate.qml
Normal file
24
qml/Components/SubtitledItemDelegate.qml
Normal file
@@ -0,0 +1,24 @@
|
||||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.2
|
||||
|
||||
ItemDelegate {
|
||||
id: root
|
||||
|
||||
property string subtitle: ""
|
||||
|
||||
contentItem: Column {
|
||||
Label {
|
||||
id: titleLabel
|
||||
|
||||
width: parent.width
|
||||
text: root.text
|
||||
}
|
||||
|
||||
Label {
|
||||
width: parent.width
|
||||
font.pixelSize: titleLabel.font.pixelSize - 2
|
||||
text: root.subtitle
|
||||
opacity: 0.8
|
||||
}
|
||||
}
|
||||
}
|
||||
5
qml/Components/qmldir
Normal file
5
qml/Components/qmldir
Normal file
@@ -0,0 +1,5 @@
|
||||
module Components
|
||||
|
||||
MainMenu 1.0 MainMenu.qml
|
||||
MenuBackButton 1.0 MenuBackButton.qml
|
||||
SubtitledItemDelegate 1.0 SubtitledItemDelegate.qml
|
||||
Reference in New Issue
Block a user