diff --git a/Linphone/view/Page/Layout/Main/MainLayout.qml b/Linphone/view/Page/Layout/Main/MainLayout.qml index e108ff40c..bea91524a 100644 --- a/Linphone/view/Page/Layout/Main/MainLayout.qml +++ b/Linphone/view/Page/Layout/Main/MainLayout.qml @@ -14,6 +14,7 @@ Item { id: mainItem property var callObj property var contextualMenuOpenedComponent: undefined + property bool showLeftMenu: true signal addAccountRequest signal openNewCallRequest @@ -121,12 +122,12 @@ Item { RowLayout { anchors.fill: parent spacing: 0 - anchors.topMargin: Utils.getSizeWithScreenRatio(25) - + anchors.topMargin: Utils.getSizeWithScreenRatio(0) VerticalTabBar { id: tabbar Layout.fillHeight: true - Layout.preferredWidth: Utils.getSizeWithScreenRatio(82) + Layout.preferredWidth: visible ? Utils.getSizeWithScreenRatio(82) : 0 + visible: mainItem.showLeftMenu defaultAccount: accountProxy.defaultAccount currentIndex: 0 onCountChanged: if (currentIndex >= count) currentIndex = 0 @@ -210,9 +211,45 @@ Item { RowLayout { id: topRow Layout.preferredHeight: Utils.getSizeWithScreenRatio(50) - Layout.leftMargin: Utils.getSizeWithScreenRatio(45) - Layout.rightMargin: Utils.getSizeWithScreenRatio(41) + Layout.leftMargin: Utils.getSizeWithScreenRatio(0) + Layout.rightMargin: Utils.getSizeWithScreenRatio(0) 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 { id: magicSearchBar Layout.fillWidth: true @@ -728,12 +765,29 @@ Item { pushExit: noTransition popEnter: noTransition popExit: noTransition - Layout.topMargin: Utils.getSizeWithScreenRatio(24) + Layout.topMargin: Utils.getSizeWithScreenRatio(0) Layout.fillWidth: true Layout.fillHeight: true 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 + } + } } } diff --git a/Linphone/view/Page/Main/AbstractMainPage.qml b/Linphone/view/Page/Main/AbstractMainPage.qml index 65b1e37d6..47af19ee0 100644 --- a/Linphone/view/Page/Main/AbstractMainPage.qml +++ b/Linphone/view/Page/Main/AbstractMainPage.qml @@ -28,7 +28,7 @@ FocusScope { Control.SplitView { id: splitView anchors.fill: parent - anchors.topMargin: Utils.getSizeWithScreenRatio(10) + anchors.topMargin: Utils.getSizeWithScreenRatio(0) handle: Rectangle { implicitWidth: Utils.getSizeWithScreenRatio(6) diff --git a/Linphone/view/Page/Main/Call/CallPage.qml b/Linphone/view/Page/Main/Call/CallPage.qml index aeaf103a3..86c9a8603 100644 --- a/Linphone/view/Page/Main/Call/CallPage.qml +++ b/Linphone/view/Page/Main/Call/CallPage.qml @@ -102,7 +102,7 @@ AbstractMainPage { Control.StackView { id: listStackView anchors.fill: parent - anchors.leftMargin: Utils.getSizeWithScreenRatio(45) + anchors.leftMargin: Utils.getSizeWithScreenRatio(0) clip: true initialItem: historyListItem focus: true @@ -139,12 +139,13 @@ AbstractMainPage { RowLayout { id: titleCallLayout // direction: FlexboxLayout.Row - spacing: Utils.getSizeWithScreenRatio(16) + spacing: Utils.getSizeWithScreenRatio(0) // alignItems: FlexboxLayout.AlignCenter - Layout.rightMargin: Utils.getSizeWithScreenRatio(39) + Layout.rightMargin: Utils.getSizeWithScreenRatio(0) Layout.fillHeight: false Text { Layout.fillWidth: true + Layout.leftMargin: Utils.getSizeWithScreenRatio(16) //: "Appels" text: qsTr("call_history_call_list_title") maximumLineCount: 1 @@ -206,7 +207,7 @@ AbstractMainPage { id: searchBar Layout.fillWidth: true Layout.topMargin: Utils.getSizeWithScreenRatio(18) - Layout.rightMargin: Utils.getSizeWithScreenRatio(39) + Layout.rightMargin: Utils.getSizeWithScreenRatio(16) //: "Rechercher un appel" placeholderText: qsTr("call_search_in_history") visible: historyListView.count !== 0 || text.length !== 0 @@ -229,8 +230,8 @@ AbstractMainPage { visible: SettingsCpp.callForwardToAddress.length > 0 Layout.fillWidth: true Layout.preferredHeight: Utils.getSizeWithScreenRatio(40) - Layout.topMargin: Utils.getSizeWithScreenRatio(18) - Layout.rightMargin: Utils.getSizeWithScreenRatio(39) + Layout.topMargin: Utils.getSizeWithScreenRatio(0) + Layout.rightMargin: Utils.getSizeWithScreenRatio(16) color: "transparent" radius: Utils.getSizeWithScreenRatio(25) border.color: DefaultStyle.warning_500_main @@ -267,7 +268,7 @@ AbstractMainPage { Control.Control { id: listLayout anchors.fill: parent - anchors.rightMargin: Utils.getSizeWithScreenRatio(39) + anchors.rightMargin: Utils.getSizeWithScreenRatio(16) padding: 0 background: Item {} contentItem: ColumnLayout { @@ -288,7 +289,7 @@ AbstractMainPage { id: historyListView Layout.fillWidth: true Layout.fillHeight: true - Layout.topMargin: Utils.getSizeWithScreenRatio(38) + Layout.topMargin: Utils.getSizeWithScreenRatio(0) searchBar: searchBar Control.ScrollBar.vertical: scrollbar diff --git a/Linphone/view/Page/Main/Chat/ChatPage.qml b/Linphone/view/Page/Main/Chat/ChatPage.qml index 3de8b3997..86c4a660c 100644 --- a/Linphone/view/Page/Main/Chat/ChatPage.qml +++ b/Linphone/view/Page/Main/Chat/ChatPage.qml @@ -104,7 +104,7 @@ AbstractMainPage { id: listStackView Layout.fillWidth: true Layout.fillHeight: true - Layout.leftMargin: Utils.getSizeWithScreenRatio(45) + Layout.leftMargin: Utils.getSizeWithScreenRatio(0) clip: true initialItem: chatListItem focus: true @@ -124,11 +124,12 @@ AbstractMainPage { RowLayout { // direction: FlexboxLayout.Row // alignItems: FlexboxLayout.AlignCenter - spacing: Utils.getSizeWithScreenRatio(16) - Layout.rightMargin: Utils.getSizeWithScreenRatio(39) + spacing: Utils.getSizeWithScreenRatio(0) + Layout.rightMargin: Utils.getSizeWithScreenRatio(0) Layout.fillHeight: false Text { Layout.fillWidth: true + Layout.leftMargin: Utils.getSizeWithScreenRatio(16) //: "Conversations" text: qsTr("chat_list_title") maximumLineCount: 1 @@ -196,7 +197,7 @@ AbstractMainPage { Layout.fillHeight: true ColumnLayout { anchors.fill: parent - anchors.rightMargin: Utils.getSizeWithScreenRatio(39) + anchors.rightMargin: Utils.getSizeWithScreenRatio(8) Text { visible: chatListView.count === 0 && chatListView.loading === false Layout.alignment: Qt.AlignHCenter @@ -215,7 +216,7 @@ AbstractMainPage { Layout.fillWidth: true Layout.fillHeight: true chatProxy.model: AppCpp.chats - Layout.topMargin: Utils.getSizeWithScreenRatio(39) + Layout.topMargin: Utils.getSizeWithScreenRatio(0) searchBar: searchBar Control.ScrollBar.vertical: scrollbar @@ -246,7 +247,7 @@ AbstractMainPage { anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: parent.right - anchors.rightMargin: Utils.getSizeWithScreenRatio(8) + anchors.rightMargin: Utils.getSizeWithScreenRatio(1) policy: Control.ScrollBar.AsNeeded } } diff --git a/Linphone/view/Page/Window/AbstractWindow.qml b/Linphone/view/Page/Window/AbstractWindow.qml index 7d54b0aa6..aa5a1de39 100644 --- a/Linphone/view/Page/Window/AbstractWindow.qml +++ b/Linphone/view/Page/Window/AbstractWindow.qml @@ -13,8 +13,8 @@ ApplicationWindow { id: mainWindow x: 0 y: 0 - width: Math.min(Utils.getSizeWithScreenRatio(1512), Screen.desktopAvailableWidth) - height: Math.min(Utils.getSizeWithScreenRatio(982), Screen.desktopAvailableHeight) + width: Math.min(Utils.getSizeWithScreenRatio(1020), Screen.desktopAvailableWidth) + height: Math.min(Utils.getSizeWithScreenRatio(700), Screen.desktopAvailableHeight) onActiveChanged: { if (active) UtilsCpp.setLastActiveWindow(this) diff --git a/Linphone/view/Style/DefaultStyle.qml b/Linphone/view/Style/DefaultStyle.qml index c514f19e7..997f73d81 100644 --- a/Linphone/view/Style/DefaultStyle.qml +++ b/Linphone/view/Style/DefaultStyle.qml @@ -51,9 +51,9 @@ QtObject { property var vue_meter_light_green: "#6FF88D" property var vue_meter_dark_green: "#00D916" - property real defaultHeight: 1007.0 - property real defaultWidth: 1512.0 - property real maxDp: 0.98 + property real defaultHeight: 700 + property real defaultWidth: 1020 + property real maxDp: Screen.pixelDensity property real dp: Math.min((Screen.width/Screen.height)/(defaultWidth/defaultHeight), maxDp) onDpChanged: {