Commit af0c3d19 authored by Ronan Abhamon's avatar Ronan Abhamon

feat(Menu): supports background

parent cc4e0252
......@@ -38,4 +38,5 @@ QtObject {
property color u: '#B1B1B1'
property color v: '#E2E2E2'
property color w: '#A1A1A1'
property color x: '#96A5B1'
}
......@@ -8,7 +8,7 @@ import Common.Styles 1.0
// Responsive flat menu with visual indicators.
// ===================================================================
ColumnLayout {
Rectangle {
id: menu
property int entryHeight
......@@ -19,6 +19,22 @@ ColumnLayout {
signal entrySelected (int entry)
// -----------------------------------------------------------------
function resetSelectedEntry () {
_selectedEntry = -1
}
// -----------------------------------------------------------------
color: MenuStyle.backgroundColor
implicitHeight: content.height
width: entryWidth
ColumnLayout {
id: content
anchors.centerIn: parent
spacing: MenuStyle.spacing
Repeater {
......@@ -95,4 +111,5 @@ ColumnLayout {
}
}
}
}
}
......@@ -6,7 +6,8 @@ import Common 1.0
// ===================================================================
QtObject {
property int spacing: 0
property int spacing: 1
property color backgroundColor: Colors.x
property QtObject entry: QtObject {
property int iconSize: 24
......
......@@ -126,8 +126,10 @@ ApplicationWindow {
spacing: 0
Menu {
id: menu
entryHeight: MainWindowStyle.menu.entryHeight
entryWidth: parent.width
entryWidth: MainWindowStyle.menu.width
entries: [{
entryName: qsTr('homeEntry'),
......@@ -156,7 +158,10 @@ ApplicationWindow {
Layout.fillWidth: true
model: ContactsListModel {} // Use History list.
onClicked: setView('Conversation')
onClicked: {
menu.resetSelectedEntry()
setView('Conversation')
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment