Commit d35ca30b authored by Ronan Abhamon's avatar Ronan Abhamon

test

parent b81f52dd
...@@ -303,6 +303,7 @@ ...@@ -303,6 +303,7 @@
<file>ui/views/App/Main/Contacts.qml</file> <file>ui/views/App/Main/Contacts.qml</file>
<file>ui/views/App/Main/Conversation.qml</file> <file>ui/views/App/Main/Conversation.qml</file>
<file>ui/views/App/Main/Home.qml</file> <file>ui/views/App/Main/Home.qml</file>
<file>ui/views/App/Main/MainWindowMenuBar.qml</file>
<file>ui/views/App/Main/MainWindow.qml</file> <file>ui/views/App/Main/MainWindow.qml</file>
<file>ui/views/App/ManageAccounts.qml</file> <file>ui/views/App/ManageAccounts.qml</file>
<file>ui/views/App/qmldir</file> <file>ui/views/App/qmldir</file>
......
...@@ -2,6 +2,8 @@ import QtQuick 2.7 ...@@ -2,6 +2,8 @@ import QtQuick 2.7
import QtQuick.Controls 2.0 import QtQuick.Controls 2.0
import QtQuick.Layouts 1.3 import QtQuick.Layouts 1.3
import QtQuick.Controls 1.4 as Controls1
import Common 1.0 import Common 1.0
import Linphone 1.0 import Linphone 1.0
import Utils 1.0 import Utils 1.0
...@@ -10,7 +12,7 @@ import App.Styles 1.0 ...@@ -10,7 +12,7 @@ import App.Styles 1.0
// ============================================================================= // =============================================================================
ApplicationWindow { Controls1.ApplicationWindow {
id: window id: window
property string _currentView: '' property string _currentView: ''
...@@ -62,7 +64,7 @@ ApplicationWindow { ...@@ -62,7 +64,7 @@ ApplicationWindow {
} }
function _setView (view, props) { function _setView (view, props) {
window.show() window.setVisible(true)
window.requestActivate() window.requestActivate()
collapse.setCollapsed(true) collapse.setCollapsed(true)
...@@ -84,12 +86,24 @@ ApplicationWindow { ...@@ -84,12 +86,24 @@ ApplicationWindow {
onActiveFocusItemChanged: activeFocusItem == null && smartSearchBar.hideMenu() onActiveFocusItemChanged: activeFocusItem == null && smartSearchBar.hideMenu()
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Toolbar properties. // Menu bar.
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
header: ToolBar { menuBar: MainWindowMenuBar {}
ColumnLayout {
anchors.fill: parent
spacing: 0
// -------------------------------------------------------------------------
// Toolbar properties.
// -------------------------------------------------------------------------
ToolBar {
background: MainWindowStyle.toolBar.background background: MainWindowStyle.toolBar.background
height: MainWindowStyle.toolBar.height Layout.preferredHeight: MainWindowStyle.toolBar.height
Layout.fillWidth: true
RowLayout { RowLayout {
anchors { anchors {
...@@ -171,12 +185,14 @@ ApplicationWindow { ...@@ -171,12 +185,14 @@ ApplicationWindow {
} }
} }
// --------------------------------------------------------------------------- // -------------------------------------------------------------------------
// Content. // Content.
// --------------------------------------------------------------------------- // -------------------------------------------------------------------------
RowLayout { RowLayout {
anchors.fill: parent Layout.fillHeight: true
Layout.fillWidth: true
spacing: 0 spacing: 0
// Main menu. // Main menu.
...@@ -225,4 +241,5 @@ ApplicationWindow { ...@@ -225,4 +241,5 @@ ApplicationWindow {
Component.onCompleted: setView('Home') Component.onCompleted: setView('Home')
} }
} }
}
} }
import QtQuick.Controls 1.4
MenuBar {
Menu {
title: "File"
MenuItem { text: "Open..." }
MenuItem { text: "Close" }
}
}
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