mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-29 01:39:19 +00:00
fix(ui/views/App/Main/MainWindowMenuBar): clean file and remove useless code
This commit is contained in:
parent
533d57fdab
commit
c1275cab32
4 changed files with 24 additions and 80 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -1,47 +1,44 @@
|
|||
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 {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,51 +0,0 @@
|
|||
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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue