From 4fca0a414040b1278510c021d74ae0bea5ccc142 Mon Sep 17 00:00:00 2001 From: gaelle Date: Tue, 16 Sep 2025 16:16:09 +0200 Subject: [PATCH] fix time combo box interaction #LINQT-1913 fix arrow indicator on combobox #LINQT-1954 --- Linphone/view/Control/Button/ComboBox.qml | 14 ++++++++------ .../Control/Button/CountryIndicatorCombobox.qml | 1 - Linphone/view/Control/Container/TabBar.qml | 3 ++- Linphone/view/Control/Input/TimeComboBox.qml | 4 ++-- Linphone/view/Page/Form/Register/RegisterPage.qml | 1 + 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Linphone/view/Control/Button/ComboBox.qml b/Linphone/view/Control/Button/ComboBox.qml index e8f3033c1..47604ed96 100644 --- a/Linphone/view/Control/Button/ComboBox.qml +++ b/Linphone/view/Control/Button/ComboBox.qml @@ -17,6 +17,10 @@ Control.ComboBox { property bool oneLine: false property bool shadowEnabled: mainItem.activeFocus || mainItem.hovered property string flagRole// Specific case if flag is shown (special font) + property var indicatorColor: DefaultStyle.main2_600 + property int indicatorRightMargin: Math.round(20 * DefaultStyle.dp) + leftPadding: Math.round(10 * DefaultStyle.dp) + rightPadding: indicImage.width + indicatorRightMargin onConstantImageSourceChanged: if (constantImageSource) selectedItemImg.imageSource = constantImageSource onCurrentIndexChanged: { @@ -70,9 +74,6 @@ Control.ComboBox { } } contentItem: RowLayout { - anchors.fill: parent - anchors.leftMargin: mainItem.leftMargin - anchors.rightMargin: indicImage.width + Math.round(10 * DefaultStyle.dp) spacing: Math.round(5 * DefaultStyle.dp) EffectImage { id: selectedItemImg @@ -119,11 +120,13 @@ Control.ComboBox { id: indicImage z: 1 anchors.right: parent.right - anchors.rightMargin: Math.round(10 * DefaultStyle.dp) + anchors.rightMargin: mainItem.indicatorRightMargin anchors.verticalCenter: parent.verticalCenter imageSource: AppIcons.downArrow - width: Math.round(14 * DefaultStyle.dp) + width: Math.round(15 * DefaultStyle.dp) + height: Math.round(15 * DefaultStyle.dp) fillMode: Image.PreserveAspectFit + colorizationColor: mainItem.indicatorColor } popup: Control.Popup { @@ -132,7 +135,6 @@ Control.ComboBox { width: mainItem.width implicitHeight: Math.min(contentItem.implicitHeight, mainWindow.height) padding: Math.max(Math.round(1 * DefaultStyle.dp), 1) - //height: Math.min(implicitHeight, 300) onOpened: { listView.positionViewAtIndex(listView.currentIndex, ListView.Center) diff --git a/Linphone/view/Control/Button/CountryIndicatorCombobox.qml b/Linphone/view/Control/Button/CountryIndicatorCombobox.qml index a0b19ab16..f1db297fd 100644 --- a/Linphone/view/Control/Button/CountryIndicatorCombobox.qml +++ b/Linphone/view/Control/Button/CountryIndicatorCombobox.qml @@ -43,7 +43,6 @@ ColumnLayout { : "transparent" } contentItem: Item { - anchors.fill: parent readonly property var currentItem: combobox.model.getAt(combobox.currentIndex) anchors.leftMargin: Math.round(15 * DefaultStyle.dp) Text { diff --git a/Linphone/view/Control/Container/TabBar.qml b/Linphone/view/Control/Container/TabBar.qml index 9387f77a5..005b79f18 100644 --- a/Linphone/view/Control/Container/TabBar.qml +++ b/Linphone/view/Control/Container/TabBar.qml @@ -12,6 +12,7 @@ Control.TabBar { : 0 property real pixelSize: Typography.h3.pixelSize property real textWeight: Typography.h3.weight + property int capitalization: Font.Capitalize wheelEnabled: true background: Item { id: tabBarBackground @@ -93,7 +94,7 @@ Control.TabBar { font { pixelSize: mainItem.pixelSize weight: mainItem.textWeight - capitalization: Font.Capitalize + capitalization: mainItem.capitalization } color: mainItem.currentIndex === index ? DefaultStyle.main2_600 : DefaultStyle.main2_400 elide: Text.ElideRight diff --git a/Linphone/view/Control/Input/TimeComboBox.qml b/Linphone/view/Control/Input/TimeComboBox.qml index 8a331c8df..be2ae5310 100644 --- a/Linphone/view/Control/Input/TimeComboBox.qml +++ b/Linphone/view/Control/Input/TimeComboBox.qml @@ -4,6 +4,7 @@ import UtilsCpp 1.0 ComboBox { id: mainItem + indicatorRightMargin: Math.round(10 * DefaultStyle.dp) property var selectedDateTime onSelectedDateTimeChanged: { if (minTime != undefined) { @@ -31,9 +32,9 @@ ComboBox { popup.onOpened: { input.forceActiveFocus() } + contentItem: TextInput { id: input - anchors.right: indicator.left validator: IntValidator{} // activeFocusOnPress: false inputMask: "00:00" @@ -45,7 +46,6 @@ ComboBox { onActiveFocusChanged: { if (activeFocus) { selectAll() - mainItem.popup.open() } else { listView.currentIndex = -1 mainItem.selectedDateTime = UtilsCpp.createDateTime(mainItem.selectedDateTime, hour, min) diff --git a/Linphone/view/Page/Form/Register/RegisterPage.qml b/Linphone/view/Page/Form/Register/RegisterPage.qml index ef45de6d8..7252a9335 100644 --- a/Linphone/view/Page/Form/Register/RegisterPage.qml +++ b/Linphone/view/Page/Form/Register/RegisterPage.qml @@ -104,6 +104,7 @@ LoginLayout { model: [qsTr("assistant_account_register_with_phone_number"), // "S'inscrire avec un email" qsTr("assistant_account_register_with_email")] + capitalization: Font.MixedCase } Flickable { Layout.fillWidth: true