diff --git a/Linphone/view/App/Layout/MainLayout.qml b/Linphone/view/App/Layout/MainLayout.qml index fbb394f5a..0e6ac27b8 100644 --- a/Linphone/view/App/Layout/MainLayout.qml +++ b/Linphone/view/App/Layout/MainLayout.qml @@ -21,7 +21,6 @@ Item { VerticalTabBar { id: tabbar Layout.fillHeight: true - Layout.preferredWidth: width model: [ {icon: AppIcons.phone, selectedIcon: AppIcons.phoneSelected, label: qsTr("Appels")}, {icon: AppIcons.adressBook, selectedIcon: AppIcons.adressBookSelected, label: qsTr("Contacts")}, diff --git a/Linphone/view/Item/VerticalTabBar.qml b/Linphone/view/Item/VerticalTabBar.qml index 05d3afebe..bb5763bd5 100644 --- a/Linphone/view/Item/VerticalTabBar.qml +++ b/Linphone/view/Item/VerticalTabBar.qml @@ -9,11 +9,9 @@ Control.TabBar { id: mainItem spacing: 15 topPadding: 20 - // leftPadding: 15 - // rightPadding: 15 property var model - + contentItem: ListView { model: mainItem.contentModel currentIndex: mainItem.currentIndex @@ -55,31 +53,35 @@ Control.TabBar { } Repeater { + id: actionsRepeater model: mainItem.model Control.TabButton { id: tabButton - anchors.left: parent.left - anchors.right: parent.right + width: mainItem.width contentItem: ColumnLayout { - anchors.fill: parent + height: tabButton.height + width: tabButton.width EffectImage { id: buttonIcon + property int buttonSize: 20 image.source: mainItem.currentIndex === index ? modelData.selectedIcon : modelData.icon - Layout.preferredWidth: 20 - Layout.preferredHeight: 20 + Layout.preferredWidth: buttonSize + Layout.preferredHeight: buttonSize Layout.alignment: Qt.AlignHCenter - image.sourceSize.width: 20 + image.sourceSize.width: buttonSize image.fillMode: Image.PreserveAspectFit effect.brightness: 1.0 } Text { id: buttonText text: modelData.label - font.bold: mainItem.currentIndex === index - font.pointSize: DefaultStyle.verticalTabButtonTextSize + font { + bold: mainItem.currentIndex === index + pointSize: DefaultStyle.verticalTabButtonTextSize + } color: DefaultStyle.verticalTabBarTextColor - Layout.preferredWidth: txtMeter.width + Layout.fillWidth: true Layout.preferredHeight: txtMeter.height Layout.alignment: Qt.AlignHCenter horizontalAlignment: Text.AlignHCenter @@ -91,11 +93,14 @@ Control.TabBar { id: txtMeter text: modelData.label font: buttonText.font - Component.onCompleted: mainItem.width = Math.max(mainItem.width, advanceWidth) + Component.onCompleted: { + font.bold= true + mainItem.implicitWidth = Math.max(mainItem.implicitWidth, advanceWidth + buttonIcon.buttonSize) + } } background: Item { } } } -} \ No newline at end of file +} diff --git a/Linphone/view/Page/Main/AbstractMainPage.qml b/Linphone/view/Page/Main/AbstractMainPage.qml index 302163424..a7a56fa50 100644 --- a/Linphone/view/Page/Main/AbstractMainPage.qml +++ b/Linphone/view/Page/Main/AbstractMainPage.qml @@ -29,11 +29,9 @@ Item { color: Control.SplitHandle.hovered ? DefaultStyle.splitViewHoveredHandleColor : DefaultStyle.splitViewHandleColor } - Component.onCompleted: { - leftPanel.implicitWidth = 280 - } ColumnLayout { id: leftPanel + Control.SplitView.preferredWidth: 280 } Rectangle { id: rightPanel