mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-21 21:58:06 +00:00
feat(ui/views/App/Main/MainWindow): hide menu bar when small view is displayed
This commit is contained in:
parent
98f7f1787f
commit
b631f435bc
4 changed files with 40 additions and 11 deletions
|
|
@ -15,6 +15,7 @@ Item {
|
|||
|
||||
property var target
|
||||
property int targetHeight
|
||||
readonly property alias isCollapsed: collapse._collapsed
|
||||
|
||||
property bool _collapsed: false
|
||||
property var _savedHeight
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ import App.Styles 1.0
|
|||
Controls1.ApplicationWindow {
|
||||
id: window
|
||||
|
||||
property string _currentView: ''
|
||||
property string _currentView
|
||||
property var _lockedInfo
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
|
@ -84,15 +84,25 @@ Controls1.ApplicationWindow {
|
|||
title: MainWindowStyle.title
|
||||
visible: true
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Menu bar.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
menuBar: MainWindowMenuBar {
|
||||
hide: !collapse.isCollapsed
|
||||
}
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
Component.onCompleted: _setView('Home')
|
||||
|
||||
onActiveFocusItemChanged: activeFocusItem == null && smartSearchBar.hideMenu()
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// Mernu bar.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
menuBar: MainWindowMenuBar {}
|
||||
|
||||
ColumnLayout {
|
||||
id: container
|
||||
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
|
|
@ -149,12 +159,10 @@ Controls1.ApplicationWindow {
|
|||
|
||||
Text {
|
||||
clip: true
|
||||
font {
|
||||
pointSize: MainWindowStyle.autoAnswerStatus.text.fontSize
|
||||
}
|
||||
color: MainWindowStyle.autoAnswerStatus.text.color
|
||||
font.pointSize: MainWindowStyle.autoAnswerStatus.text.fontSize
|
||||
text: qsTr('autoAnswerStatus')
|
||||
width: parent.width
|
||||
color: MainWindowStyle.autoAnswerStatus.text.color
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -238,8 +246,6 @@ Controls1.ApplicationWindow {
|
|||
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
Component.onCompleted: setView('Home')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,27 @@ import App.Styles 1.0
|
|||
// ============================================================================
|
||||
|
||||
MenuBar {
|
||||
id: container
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
property bool hide: false
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
// Workaround to hide toolbar.
|
||||
// Use private properties of MenuBar.
|
||||
|
||||
__contentItem.height: hide
|
||||
? 0
|
||||
: MainWindowMenuBarStyle.height
|
||||
|
||||
__contentItem.transform: Scale {
|
||||
yScale: Number(!hide)
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
style: MenuBarStyle {
|
||||
background: Rectangle {
|
||||
color: MainWindowMenuBarStyle.color
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import Common 1.0
|
|||
|
||||
QtObject {
|
||||
property color color: Colors.v
|
||||
property int height: 27
|
||||
|
||||
property QtObject menu: QtObject {
|
||||
property QtObject text: QtObject {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue