Commit c1275cab authored by Ronan's avatar Ronan

fix(ui/views/App/Main/MainWindowMenuBar): clean file and remove useless code

parent 533d57fd
......@@ -405,7 +405,6 @@
<file>ui/views/App/Styles/Main/ConversationStyle.qml</file>
<file>ui/views/App/Styles/Main/HomeStyle.qml</file>
<file>ui/views/App/Styles/Main/InviteFriendsStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowMenuBarStyle.qml</file>
<file>ui/views/App/Styles/Main/MainWindowStyle.qml</file>
<file>ui/views/App/Styles/Main/ManageAccountsStyle.qml</file>
<file>ui/views/App/Styles/qmldir</file>
......
import QtQuick 2.7
import QtQuick.Controls 2.1
import QtQuick.Controls.Styles 1.4
import QtQuick.Window 2.2
// Experimental.
import Qt.labs.platform 1.0
import Linphone 1.0
import App.Styles 1.0
// =============================================================================
Item {
function open() {
function open () {
menu.open()
}
// ---------------------------------------------------------------------------
// Shortcuts.
// ---------------------------------------------------------------------------
Shortcut {
id: settings_shortcut
id: settingsShortcut
context: Qt.ApplicationShortcut
sequence: StandardKey.Preferences
onActivated: {
var window = App.getSettingsWindow()
if (window.visibility === Window.Minimized) {
window.visibility = Window.AutomaticVisibility
} else {
window.setVisible(true)
}
}
onActivated: App.smartShowWindow(App.getSettingsWindow())
}
Shortcut {
id: quit_shortcut
sequence: StandardKey.Quit
id: quitShortcut
context: Qt.ApplicationShortcut
sequence: StandardKey.Quit
onActivated: Qt.quit()
}
Shortcut {
id: about_shortcut
id: aboutShortcut
sequence: StandardKey.HelpContents
onActivated: {
window.detachVirtualWindow()
window.attachVirtualWindow(Qt.resolvedUrl('About.qml'))
......@@ -59,19 +56,19 @@ Item {
title: qsTr('options')
MenuItem {
shortcut: settings_shortcut.sequence
shortcut: settingsShortcut.sequence
text: qsTr('settings')
onTriggered: settings_shortcut.onActivated()
onTriggered: settingsShortcut.onActivated()
}
MenuSeparator {}
MenuItem {
shortcut: quit_shortcut.sequence
shortcut: quitShortcut.sequence
text: qsTr('quit')
onTriggered: quit_shortcut.onActivated()
onTriggered: quitShortcut.onActivated()
}
}
......@@ -97,10 +94,10 @@ Item {
title: qsTr('help')
MenuItem {
shortcut: about_shortcut.sequence
shortcut: aboutShortcut.sequence
text: qsTr('about')
onTriggered: about_shortcut.onActivated()
onTriggered: aboutShortcut.onActivated()
}
MenuSeparator {}
......@@ -112,4 +109,4 @@ Item {
}
}
}
}
\ No newline at end of file
}
pragma Singleton
import QtQuick 2.7
import Common 1.0
// =============================================================================
QtObject {
property color color: Colors.v
property int height: 27
property QtObject menu: QtObject {
property QtObject text: QtObject {
property int fontSize: 10
property int horizontalMargins: 9
property int verticalMargins: 4
property QtObject color: QtObject {
property color selected: Colors.i
property color normal: Colors.b
}
}
property QtObject indicator: QtObject {
property color color: Colors.i
property int height: 2
}
}
property QtObject separator: QtObject {
property color color: Colors.u
property int height: 1
property int spacing: 4
}
property QtObject subMenu: QtObject {
property QtObject color: QtObject {
property color selected: Colors.i
property color normal: Colors.k
}
property QtObject text: QtObject {
property int fontSize: 10
property QtObject color: QtObject {
property color selected: Colors.k
property color normal: Colors.b
}
}
}
}
......@@ -22,7 +22,6 @@ singleton ContactsStyle 1.0 Main/ContactsStyle.qml
singleton ConversationStyle 1.0 Main/ConversationStyle.qml
singleton HomeStyle 1.0 Main/HomeStyle.qml
singleton InviteFriendsStyle 1.0 Main/InviteFriendsStyle.qml
singleton MainWindowMenuBarStyle 1.0 Main/MainWindowMenuBarStyle.qml
singleton MainWindowStyle 1.0 Main/MainWindowStyle.qml
singleton ManageAccountsStyle 1.0 Main/ManageAccountsStyle.qml
......
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