mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-04-17 20:08:28 +00:00
Remove useless spaces, set default to minimalist and use Screen pixel depth definition instead of forcing max size.
Add a collapse/expand button for main menu.
This commit is contained in:
parent
2123c573fa
commit
72e2332711
6 changed files with 82 additions and 26 deletions
|
|
@ -14,6 +14,7 @@ Item {
|
||||||
id: mainItem
|
id: mainItem
|
||||||
property var callObj
|
property var callObj
|
||||||
property var contextualMenuOpenedComponent: undefined
|
property var contextualMenuOpenedComponent: undefined
|
||||||
|
property bool showLeftMenu: true
|
||||||
|
|
||||||
signal addAccountRequest
|
signal addAccountRequest
|
||||||
signal openNewCallRequest
|
signal openNewCallRequest
|
||||||
|
|
@ -121,12 +122,12 @@ Item {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
anchors.topMargin: Utils.getSizeWithScreenRatio(25)
|
anchors.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
|
|
||||||
VerticalTabBar {
|
VerticalTabBar {
|
||||||
id: tabbar
|
id: tabbar
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.preferredWidth: Utils.getSizeWithScreenRatio(82)
|
Layout.preferredWidth: visible ? Utils.getSizeWithScreenRatio(82) : 0
|
||||||
|
visible: mainItem.showLeftMenu
|
||||||
defaultAccount: accountProxy.defaultAccount
|
defaultAccount: accountProxy.defaultAccount
|
||||||
currentIndex: 0
|
currentIndex: 0
|
||||||
onCountChanged: if (currentIndex >= count) currentIndex = 0
|
onCountChanged: if (currentIndex >= count) currentIndex = 0
|
||||||
|
|
@ -210,9 +211,45 @@ Item {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: topRow
|
id: topRow
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(50)
|
Layout.preferredHeight: Utils.getSizeWithScreenRatio(50)
|
||||||
Layout.leftMargin: Utils.getSizeWithScreenRatio(45)
|
Layout.leftMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.rightMargin: Utils.getSizeWithScreenRatio(41)
|
Layout.rightMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
spacing: Utils.getSizeWithScreenRatio(25)
|
spacing: Utils.getSizeWithScreenRatio(25)
|
||||||
|
Item {
|
||||||
|
Layout.preferredHeight: parent.height
|
||||||
|
Layout.preferredWidth: Utils.getSizeWithScreenRatio(82)
|
||||||
|
visible: !mainItem.showLeftMenu
|
||||||
|
Rectangle {
|
||||||
|
anchors.fill: parent
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
radius: Utils.getSizeWithScreenRatio(25)
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
width: parent.width / 2
|
||||||
|
height: parent.height / 2
|
||||||
|
}
|
||||||
|
Rectangle {
|
||||||
|
color: DefaultStyle.main1_500_main
|
||||||
|
y: parent.y + parent.height / 2
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height / 2
|
||||||
|
}
|
||||||
|
EffectImage {
|
||||||
|
anchors.centerIn: parent
|
||||||
|
height: Utils.getSizeWithScreenRatio(24)
|
||||||
|
width: Utils.getSizeWithScreenRatio(24)
|
||||||
|
imageSource: AppIcons.layout
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
colorizationColor: DefaultStyle.grey_0
|
||||||
|
useColor: true
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: mainItem.showLeftMenu = !mainItem.showLeftMenu
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
SearchBar {
|
SearchBar {
|
||||||
id: magicSearchBar
|
id: magicSearchBar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
|
@ -728,12 +765,29 @@ Item {
|
||||||
pushExit: noTransition
|
pushExit: noTransition
|
||||||
popEnter: noTransition
|
popEnter: noTransition
|
||||||
popExit: noTransition
|
popExit: noTransition
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(24)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
initialItem: mainStackLayoutComponent
|
initialItem: mainStackLayoutComponent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
EffectImage {
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.leftMargin: Utils.getSizeWithScreenRatio(82-24)/2
|
||||||
|
anchors.topMargin: Utils.getSizeWithScreenRatio(8)
|
||||||
|
height: Utils.getSizeWithScreenRatio(24)
|
||||||
|
width: Utils.getSizeWithScreenRatio(24)
|
||||||
|
visible: mainItem.showLeftMenu
|
||||||
|
imageSource: AppIcons.layout
|
||||||
|
fillMode: Image.PreserveAspectFit
|
||||||
|
colorizationColor: DefaultStyle.grey_0
|
||||||
|
useColor: true
|
||||||
|
MouseArea{
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: mainItem.showLeftMenu = !mainItem.showLeftMenu
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ FocusScope {
|
||||||
Control.SplitView {
|
Control.SplitView {
|
||||||
id: splitView
|
id: splitView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.topMargin: Utils.getSizeWithScreenRatio(10)
|
anchors.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
|
|
||||||
handle: Rectangle {
|
handle: Rectangle {
|
||||||
implicitWidth: Utils.getSizeWithScreenRatio(6)
|
implicitWidth: Utils.getSizeWithScreenRatio(6)
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ AbstractMainPage {
|
||||||
Control.StackView {
|
Control.StackView {
|
||||||
id: listStackView
|
id: listStackView
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.leftMargin: Utils.getSizeWithScreenRatio(45)
|
anchors.leftMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
clip: true
|
clip: true
|
||||||
initialItem: historyListItem
|
initialItem: historyListItem
|
||||||
focus: true
|
focus: true
|
||||||
|
|
@ -139,12 +139,13 @@ AbstractMainPage {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
id: titleCallLayout
|
id: titleCallLayout
|
||||||
// direction: FlexboxLayout.Row
|
// direction: FlexboxLayout.Row
|
||||||
spacing: Utils.getSizeWithScreenRatio(16)
|
spacing: Utils.getSizeWithScreenRatio(0)
|
||||||
// alignItems: FlexboxLayout.AlignCenter
|
// alignItems: FlexboxLayout.AlignCenter
|
||||||
Layout.rightMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.rightMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.fillHeight: false
|
Layout.fillHeight: false
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: Utils.getSizeWithScreenRatio(16)
|
||||||
//: "Appels"
|
//: "Appels"
|
||||||
text: qsTr("call_history_call_list_title")
|
text: qsTr("call_history_call_list_title")
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
|
@ -206,7 +207,7 @@ AbstractMainPage {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(18)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(18)
|
||||||
Layout.rightMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.rightMargin: Utils.getSizeWithScreenRatio(16)
|
||||||
//: "Rechercher un appel"
|
//: "Rechercher un appel"
|
||||||
placeholderText: qsTr("call_search_in_history")
|
placeholderText: qsTr("call_search_in_history")
|
||||||
visible: historyListView.count !== 0 || text.length !== 0
|
visible: historyListView.count !== 0 || text.length !== 0
|
||||||
|
|
@ -229,8 +230,8 @@ AbstractMainPage {
|
||||||
visible: SettingsCpp.callForwardToAddress.length > 0
|
visible: SettingsCpp.callForwardToAddress.length > 0
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.preferredHeight: Utils.getSizeWithScreenRatio(40)
|
Layout.preferredHeight: Utils.getSizeWithScreenRatio(40)
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(18)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.rightMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.rightMargin: Utils.getSizeWithScreenRatio(16)
|
||||||
color: "transparent"
|
color: "transparent"
|
||||||
radius: Utils.getSizeWithScreenRatio(25)
|
radius: Utils.getSizeWithScreenRatio(25)
|
||||||
border.color: DefaultStyle.warning_500_main
|
border.color: DefaultStyle.warning_500_main
|
||||||
|
|
@ -267,7 +268,7 @@ AbstractMainPage {
|
||||||
Control.Control {
|
Control.Control {
|
||||||
id: listLayout
|
id: listLayout
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: Utils.getSizeWithScreenRatio(39)
|
anchors.rightMargin: Utils.getSizeWithScreenRatio(16)
|
||||||
padding: 0
|
padding: 0
|
||||||
background: Item {}
|
background: Item {}
|
||||||
contentItem: ColumnLayout {
|
contentItem: ColumnLayout {
|
||||||
|
|
@ -288,7 +289,7 @@ AbstractMainPage {
|
||||||
id: historyListView
|
id: historyListView
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(38)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
searchBar: searchBar
|
searchBar: searchBar
|
||||||
Control.ScrollBar.vertical: scrollbar
|
Control.ScrollBar.vertical: scrollbar
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,7 +104,7 @@ AbstractMainPage {
|
||||||
id: listStackView
|
id: listStackView
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
Layout.leftMargin: Utils.getSizeWithScreenRatio(45)
|
Layout.leftMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
clip: true
|
clip: true
|
||||||
initialItem: chatListItem
|
initialItem: chatListItem
|
||||||
focus: true
|
focus: true
|
||||||
|
|
@ -124,11 +124,12 @@ AbstractMainPage {
|
||||||
RowLayout {
|
RowLayout {
|
||||||
// direction: FlexboxLayout.Row
|
// direction: FlexboxLayout.Row
|
||||||
// alignItems: FlexboxLayout.AlignCenter
|
// alignItems: FlexboxLayout.AlignCenter
|
||||||
spacing: Utils.getSizeWithScreenRatio(16)
|
spacing: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.rightMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.rightMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
Layout.fillHeight: false
|
Layout.fillHeight: false
|
||||||
Text {
|
Text {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: Utils.getSizeWithScreenRatio(16)
|
||||||
//: "Conversations"
|
//: "Conversations"
|
||||||
text: qsTr("chat_list_title")
|
text: qsTr("chat_list_title")
|
||||||
maximumLineCount: 1
|
maximumLineCount: 1
|
||||||
|
|
@ -196,7 +197,7 @@ AbstractMainPage {
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
anchors.rightMargin: Utils.getSizeWithScreenRatio(39)
|
anchors.rightMargin: Utils.getSizeWithScreenRatio(8)
|
||||||
Text {
|
Text {
|
||||||
visible: chatListView.count === 0 && chatListView.loading === false
|
visible: chatListView.count === 0 && chatListView.loading === false
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
|
@ -215,7 +216,7 @@ AbstractMainPage {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.fillHeight: true
|
Layout.fillHeight: true
|
||||||
chatProxy.model: AppCpp.chats
|
chatProxy.model: AppCpp.chats
|
||||||
Layout.topMargin: Utils.getSizeWithScreenRatio(39)
|
Layout.topMargin: Utils.getSizeWithScreenRatio(0)
|
||||||
searchBar: searchBar
|
searchBar: searchBar
|
||||||
Control.ScrollBar.vertical: scrollbar
|
Control.ScrollBar.vertical: scrollbar
|
||||||
|
|
||||||
|
|
@ -246,7 +247,7 @@ AbstractMainPage {
|
||||||
anchors.top: parent.top
|
anchors.top: parent.top
|
||||||
anchors.bottom: parent.bottom
|
anchors.bottom: parent.bottom
|
||||||
anchors.right: parent.right
|
anchors.right: parent.right
|
||||||
anchors.rightMargin: Utils.getSizeWithScreenRatio(8)
|
anchors.rightMargin: Utils.getSizeWithScreenRatio(1)
|
||||||
policy: Control.ScrollBar.AsNeeded
|
policy: Control.ScrollBar.AsNeeded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,8 @@ ApplicationWindow {
|
||||||
id: mainWindow
|
id: mainWindow
|
||||||
x: 0
|
x: 0
|
||||||
y: 0
|
y: 0
|
||||||
width: Math.min(Utils.getSizeWithScreenRatio(1512), Screen.desktopAvailableWidth)
|
width: Math.min(Utils.getSizeWithScreenRatio(1020), Screen.desktopAvailableWidth)
|
||||||
height: Math.min(Utils.getSizeWithScreenRatio(982), Screen.desktopAvailableHeight)
|
height: Math.min(Utils.getSizeWithScreenRatio(700), Screen.desktopAvailableHeight)
|
||||||
|
|
||||||
onActiveChanged: {
|
onActiveChanged: {
|
||||||
if (active) UtilsCpp.setLastActiveWindow(this)
|
if (active) UtilsCpp.setLastActiveWindow(this)
|
||||||
|
|
|
||||||
|
|
@ -51,9 +51,9 @@ QtObject {
|
||||||
property var vue_meter_light_green: "#6FF88D"
|
property var vue_meter_light_green: "#6FF88D"
|
||||||
property var vue_meter_dark_green: "#00D916"
|
property var vue_meter_dark_green: "#00D916"
|
||||||
|
|
||||||
property real defaultHeight: 1007.0
|
property real defaultHeight: 700
|
||||||
property real defaultWidth: 1512.0
|
property real defaultWidth: 1020
|
||||||
property real maxDp: 0.98
|
property real maxDp: Screen.pixelDensity
|
||||||
property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp)
|
property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp)
|
||||||
|
|
||||||
onDpChanged: {
|
onDpChanged: {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue