diff --git a/src/commoncomponents/AccountMigrationDialog.qml b/src/commoncomponents/AccountMigrationDialog.qml index 733358c1aa409bac70162269360532b83a8fff8f..43f54826197801c10011ca51b47559493c51a9e5 100644 --- a/src/commoncomponents/AccountMigrationDialog.qml +++ b/src/commoncomponents/AccountMigrationDialog.qml @@ -440,8 +440,8 @@ Window { id: migrationPushButton Layout.alignment: Qt.AlignLeft - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -459,8 +459,8 @@ Window { id: deleteAccountPushButton Layout.alignment: Qt.AlignRight - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 color: JamiTheme.buttonTintedRed hoveredColor: JamiTheme.buttonTintedRedHovered diff --git a/src/commoncomponents/DaemonReconnectPopup.qml b/src/commoncomponents/DaemonReconnectPopup.qml index 640b2bc937519e20cc4ca1ee268afc5675385e62..568ea835fdeb65e968ffe87b4a4e998f4204b77b 100644 --- a/src/commoncomponents/DaemonReconnectPopup.qml +++ b/src/commoncomponents/DaemonReconnectPopup.qml @@ -85,9 +85,9 @@ ModalPopup { id: btnOk Layout.alignment: Qt.AlignHCenter | Qt.AlignBottom - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight - Layout.bottomMargin: preferredMargin + + preferredWidth: JamiTheme.preferredFieldWidth / 2 + visible: connectionFailed text: qsTr("Ok") diff --git a/src/commoncomponents/DeleteAccountDialog.qml b/src/commoncomponents/DeleteAccountDialog.qml index 41093d42dfa44854088d3e934869439d05d11873..1f9e5932d035cc8037a6dd501a9de9c037e7f91b 100644 --- a/src/commoncomponents/DeleteAccountDialog.qml +++ b/src/commoncomponents/DeleteAccountDialog.qml @@ -144,8 +144,9 @@ BaseDialog { id: btnDelete Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedRed hoveredColor: JamiTheme.buttonTintedRedHovered @@ -165,8 +166,9 @@ BaseDialog { id: btnCancel Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/commoncomponents/MaterialButton.qml b/src/commoncomponents/MaterialButton.qml index 2a83d8b64dbc12bad2e8e7ccc320f1caa2632a73..85a9f0a8229f7cb5d7010a2cd012dc74b9842bfd 100644 --- a/src/commoncomponents/MaterialButton.qml +++ b/src/commoncomponents/MaterialButton.qml @@ -18,38 +18,45 @@ import QtQuick 2.14 import QtQuick.Controls 2.14 -import QtGraphicalEffects 1.14 -import QtQuick.Window 2.14 +import QtQuick.Layouts 1.14 import net.jami.Constants 1.0 +// TODO: this component suffers from excessive responsibility +// and should have fixed width and content width defined variations +// as well as better handling for the animated icon Button { id: root - property alias fontCapitalization: buttonText.font.capitalization - property alias source: buttonImage.source + property bool outlined: false property alias toolTipText: toolTip.text - property var color: "transparent" - property var hoveredColor: undefined - property var pressedColor: undefined + property alias iconSource: icon.source_ + property alias animatedIconSource: icon.animatedSource_ + property real iconSize: 18 + property var color: JamiTheme.buttonTintedBlue + property var hoveredColor: JamiTheme.buttonTintedBlueHovered + property var pressedColor: JamiTheme.buttonTintedBluePressed property var keysNavigationFocusColor: Qt.darker(hoveredColor, 2) - property var outlined: false - property string animatedImageSource: "" - - property var preferredWidth: 400 - property var preferredHeight: 36 - property var minimumIconTextSpacing: 10 - property var iconPreferredHeight: 18 - property var iconPreferredWidth: 18 - - property bool enableElide: true - property int elide: Text.ElideRight - property int textActualWidth: buttonTextMetrics.boundingRect.width + property bool hasIcon: animatedIconSource.length !== 0 || + iconSource.length !== 0 + + property var preferredWidth + Binding on width { + when: root.preferredWidth !== undefined || + root.Layout.fillWidth + value: root.preferredWidth + } + Binding on Layout.preferredWidth { + when: root.preferredWidth !== undefined || + root.Layout.fillWidth + value: width + } - font.kerning: true - font.pointSize: JamiTheme.textFontSize + property real preferredHeight: 36 + height: preferredHeight + Layout.preferredHeight: height - hoverEnabled: hoveredColor !== undefined + focusPolicy: Qt.TabFocus MaterialToolTip { id: toolTip @@ -59,109 +66,128 @@ Button { delay: Qt.styleHints.mousePressAndHoldInterval } + property string contentColorProvider: { + if (!root.outlined) + return "white" + if (root.hovered) + return root.hoveredColor + if (root.down) + return root.pressedColor + return root.color + } + contentItem: Item { - Rectangle { - anchors.fill: parent - color: "transparent" - - AnimatedImage { - id: buttonAnimatedImage - - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: JamiTheme.preferredMarginSize / 2 - - height: iconPreferredHeight - width: iconPreferredWidth - - source: animatedImageSource - playing: true - paused: false - fillMode: Image.PreserveAspectFit - mipmap: true - visible: animatedImageSource.length !== 0 + id: item + + Binding on implicitWidth { + when: root.preferredWidth === undefined || + !root.Layout.fillWidth + value: item.childrenRect.width + } + implicitHeight: childrenRect.height + RowLayout { + anchors.verticalCenter: parent.verticalCenter + Binding on width { + when: root.preferredWidth !== undefined || + root.Layout.fillWidth + value: root.availableWidth + } + spacing: hasIcon ? + JamiTheme.preferredMarginSize : + 0 + + Component { + id: iconComponent + + ResponsiveImage { + source: source_ + Layout.preferredWidth: iconSize + Layout.preferredHeight: iconSize + color: contentColorProvider + } } - ResponsiveImage { - id: buttonImage - - anchors.verticalCenter: parent.verticalCenter - anchors.left: parent.left - anchors.leftMargin: JamiTheme.preferredMarginSize / 2 - - height: iconPreferredHeight - width: iconPreferredWidth - - visible: source.toString().length !== 0 - color: { - if (!outlined) - return "white" - if (hovered && root.hoveredColor) - return root.hoveredColor - if (checked && root.pressedColor) - return root.pressedColor - return root.color + Component { + id: animatedIconComponent + + AnimatedImage { + source: animatedSource_ + Layout.preferredWidth: iconSize + Layout.preferredHeight: iconSize + width: iconSize + height: iconSize + playing: true + fillMode: Image.PreserveAspectFit + mipmap: true } } - Text { - id: buttonText + Loader { + id: icon - anchors.centerIn: parent + property string source_ + property string animatedSource_ - width: { - var iconWidth = (buttonAnimatedImage.visible || buttonImage.visible) ? - iconPreferredWidth : 0 - return (parent.width / 2 - iconWidth - - JamiTheme.preferredMarginSize / 2 - minimumIconTextSpacing) * 2 - } + active: hasIcon - TextMetrics { - id: buttonTextMetrics + Layout.preferredWidth: active * width - font: buttonText.font - text: buttonText.text - } + Layout.alignment: Qt.AlignVCenter + Layout.leftMargin: hasIcon ? + JamiTheme.preferredMarginSize / 2 : + undefined + sourceComponent: animatedSource_.length !== 0 ? + animatedIconComponent : + iconComponent + } - text: root.text - elide: enableElide ? root.elide : Text.ElideNone - color: { - if (!outlined) - return "white" - if (hovered && root.hoveredColor) - return root.hoveredColor - if (checked && root.pressedColor) - return root.pressedColor - return root.color + Text { + // this right margin will make the text visually + // centered within button + Layout.rightMargin: { + if ((!hasIcon || root.preferredWidth === undefined) && + !root.Layout.fillWidth) + return undefined + return icon.width + JamiTheme.preferredMarginSize / 2 + + parent.spacing } + Layout.fillWidth: true + Layout.alignment: Qt.AlignHCenter + text: root.text font: root.font + elide: Text.ElideRight + verticalAlignment: Text.AlignVCenter horizontalAlignment: Text.AlignHCenter + color: contentColorProvider } } } background: Rectangle { - id: backgroundRect anchors.fill: parent color: { - if (outlined) + if (root.outlined) return "transparent" - if (hovered && root.hoveredColor) + if (root.hovered) return root.hoveredColor - if (checked && root.pressedColor) + if (root.down) return root.pressedColor - return root.focus ? root.keysNavigationFocusColor : root.color + return root.focus ? + root.keysNavigationFocusColor : + root.color } border.color: { - if (!outlined) + if (!root.outlined) return "transparent" - if (hovered && root.hoveredColor) + if (root.hovered) return root.hoveredColor - if (checked && root.pressedColor) + if (root.down) return root.pressedColor - return root.focus ? root.keysNavigationFocusColor : root.color + return root.focus ? + root.keysNavigationFocusColor : + root.color } - radius: 4 + radius: JamiTheme.primaryRadius } Keys.onPressed: function (keyEvent) { diff --git a/src/commoncomponents/PasswordDialog.qml b/src/commoncomponents/PasswordDialog.qml index 3d0baa8d3d3b51c754b24115dbe3deefef3d368a..c2b0059d3b1f4df651cf261ea2271fa3c07a7138 100644 --- a/src/commoncomponents/PasswordDialog.qml +++ b/src/commoncomponents/PasswordDialog.qml @@ -190,8 +190,8 @@ BaseDialog { id: btnConfirm Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -212,8 +212,8 @@ BaseDialog { id: btnCancel Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/commoncomponents/PreferenceItemDelegate.qml b/src/commoncomponents/PreferenceItemDelegate.qml index 57b3ea9d1c71a785f2cc5f4395facb78933d84db..20e82cbceb74c27b53260f501b760b7e751733e7 100644 --- a/src/commoncomponents/PreferenceItemDelegate.qml +++ b/src/commoncomponents/PreferenceItemDelegate.qml @@ -172,15 +172,16 @@ ItemDelegate { id: pathPreferenceButton visible: preferenceType === PreferenceItemDelegate.PATH - width: root.width / 2 - 8 - Layout.preferredWidth: width - Layout.preferredHeight: 30 + + preferredWidth: root.width / 2 - 8 + preferredHeight: 30 + Layout.alignment: Qt.AlignRight | Qt.AlignVCenter Layout.rightMargin: 4 text: UtilsAdapter.fileName(preferenceCurrentValue) toolTipText: JamiStrings.chooseImageFile - source: JamiResources.round_folder_24dp_svg + iconSource: JamiResources.round_folder_24dp_svg color: JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedGreyHovered pressedColor: JamiTheme.buttonTintedGreyPressed diff --git a/src/commoncomponents/SimpleMessageDialog.qml b/src/commoncomponents/SimpleMessageDialog.qml index f1c904beb752efcf0e4f1836d90ad5df22e10470..53cd2ec0f8a5992089cbbb9cca54168c9384a2dc 100644 --- a/src/commoncomponents/SimpleMessageDialog.qml +++ b/src/commoncomponents/SimpleMessageDialog.qml @@ -91,8 +91,9 @@ BaseDialog { model: buttonTitles.length MaterialButton { Layout.alignment: Qt.AlignVCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 + preferredHeight: JamiTheme.preferredFieldHeight color: { switch(buttonStyles[modelData]) { diff --git a/src/commoncomponents/SpinnerButton.qml b/src/commoncomponents/SpinnerButton.qml index f0306a5e91eca07860f4ff1e33ef4ff4aa8fdf16..ae6103f941e22d83d07a7774fe197974322e5aad 100644 --- a/src/commoncomponents/SpinnerButton.qml +++ b/src/commoncomponents/SpinnerButton.qml @@ -28,7 +28,7 @@ MaterialButton { property string spinnerTriggeredtext: value property string normalText: value - animatedImageSource: spinnerTriggered ? + animatedIconSource: spinnerTriggered ? JamiResources.jami_rolling_spinner_gif : "" text: spinnerTriggered ? spinnerTriggeredtext : normalText diff --git a/src/constant/JamiTheme.qml b/src/constant/JamiTheme.qml index 381a8728b82c0536cf9e2822c7e0143e3e9ab6b6..24812918a6b3088c0f422050dbded4485dc6dfde 100644 --- a/src/constant/JamiTheme.qml +++ b/src/constant/JamiTheme.qml @@ -308,6 +308,7 @@ Item { property real welcomeLabelPointSize: 30 property real welcomeLogoWidth: 330 property real welcomeLogoHeight: 110 + property real wizardButtonWidth: 400 // Main application spec property real mainViewMinWidth: 300 diff --git a/src/mainview/components/AboutPopUp.qml b/src/mainview/components/AboutPopUp.qml index 0c251ed91935a09f2385800bf76e0fee2dc94274..2e46020f636c30b24b101c15d0525857bb9302bc 100644 --- a/src/mainview/components/AboutPopUp.qml +++ b/src/mainview/components/AboutPopUp.qml @@ -234,10 +234,11 @@ ModalPopup { id: btnClose Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.bottomMargin: JamiTheme.preferredMarginSize + preferredWidth: JamiTheme.preferredFieldWidth / 2 + preferredHeight: JamiTheme.preferredFieldHeight + text: qsTr("Close") color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/mainview/components/SelectScreen.qml b/src/mainview/components/SelectScreen.qml index dcb262f46632587207028a580358b1ca00384933..1bf6ccc4b00d9ab5cb1976d6c3c30e6b85f7c50c 100644 --- a/src/mainview/components/SelectScreen.qml +++ b/src/mainview/components/SelectScreen.qml @@ -347,8 +347,7 @@ Window { anchors.bottomMargin: JamiTheme.preferredMarginSize anchors.horizontalCenter: selectScreenWindowRect.horizontalCenter - width: 200 - height: 36 + preferredWidth: 200 visible: selectedScreenNumber != -1 || selectAllScreens diff --git a/src/mainview/components/UserProfile.qml b/src/mainview/components/UserProfile.qml index 3d535a68fa45bd97a062440c7410a9d31a75c798..6606be85734b75bf9716bc9f0e96aaa5e040531b 100644 --- a/src/mainview/components/UserProfile.qml +++ b/src/mainview/components/UserProfile.qml @@ -213,7 +213,7 @@ BaseDialog { text: JamiStrings.isSwarm color: JamiTheme.faddedFontColor } - + Text { Layout.alignment: Qt.AlignLeft font.pointSize: JamiTheme.textFontSize @@ -226,8 +226,9 @@ BaseDialog { Layout.columnSpan: 2 Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/mainview/components/WelcomePage.qml b/src/mainview/components/WelcomePage.qml index 5bdff512f5f8a6d7f8cb13d0b0b2afa3d47c3f76..28ad664c4f5648320292ec70a7747f2c19f5c3a6 100644 --- a/src/mainview/components/WelcomePage.qml +++ b/src/mainview/components/WelcomePage.qml @@ -159,21 +159,14 @@ Rectangle { Layout.alignment: Qt.AlignBottom | Qt.AlignHCenter Layout.bottomMargin: JamiTheme.preferredMarginSize - Layout.preferredWidth: JamiTheme.aboutButtonPreferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.aboutButtonPreferredWidth color: JamiTheme.buttonTintedBlack - enableElide: false hoveredColor: JamiTheme.buttonTintedBlackHovered pressedColor: JamiTheme.buttonTintedBlackPressed outlined: true - onTextActualWidthChanged: { - if (textActualWidth > btnAboutPopUp.Layout.preferredWidth) - btnAboutPopUp.Layout.preferredWidth = - textActualWidth + JamiTheme.preferredMarginSize * 2 - } - text: JamiStrings.aboutJami onClicked: aboutPopUpDialog.open() diff --git a/src/settingsview/components/AdvancedCallSettings.qml b/src/settingsview/components/AdvancedCallSettings.qml index 5e1eb0611f333f7db8229982c305aaa433750745..5c2917540f50257fef4a27fc5eab09e0e10e94c1 100644 --- a/src/settingsview/components/AdvancedCallSettings.qml +++ b/src/settingsview/components/AdvancedCallSettings.qml @@ -215,8 +215,9 @@ ColumnLayout { id: addDefaultModeratorPushButton Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -224,7 +225,7 @@ ColumnLayout { outlined: true toolTipText: JamiStrings.addDefaultModerator - source: JamiResources.round_add_24dp_svg + iconSource: JamiResources.round_add_24dp_svg text: JamiStrings.addDefaultModerator diff --git a/src/settingsview/components/CurrentAccountSettings.qml b/src/settingsview/components/CurrentAccountSettings.qml index f04d07737aa13d8c0562c3de4c4a51a7c8ebbe9b..44195f94569de673e4999136d3eac1eba26a8eb7 100644 --- a/src/settingsview/components/CurrentAccountSettings.qml +++ b/src/settingsview/components/CurrentAccountSettings.qml @@ -221,8 +221,9 @@ Rectangle { visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === "" Layout.alignment: Qt.AlignHCenter Layout.topMargin: JamiTheme.preferredMarginSize - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -230,14 +231,15 @@ Rectangle { outlined: true toolTipText: AccountAdapter.hasPassword() ? - JamiStrings.changeCurrentPassword : JamiStrings.setAPassword - text: AccountAdapter.hasPassword() ? JamiStrings.changePassword : JamiStrings.setPassword + JamiStrings.changeCurrentPassword : + JamiStrings.setAPassword + text: AccountAdapter.hasPassword() ? + JamiStrings.changePassword : + JamiStrings.setPassword - source: JamiResources.round_edit_24dp_svg + iconSource: JamiResources.round_edit_24dp_svg - onClicked: { - passwordClicked() - } + onClicked: passwordClicked() } MaterialButton { @@ -245,8 +247,9 @@ Rectangle { visible: !isSIP && SettingsAdapter.getAccountConfig_Manageruri() === "" Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -256,31 +259,28 @@ Rectangle { toolTipText: JamiStrings.tipBackupAccount text: JamiStrings.backupAccountBtn - source: JamiResources.round_save_alt_24dp_svg + iconSource: JamiResources.round_save_alt_24dp_svg - onClicked: { - exportAccountSlot() - } + onClicked: exportAccountSlot() } MaterialButton { Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.leftMargin: JamiTheme.preferredMarginSize Layout.rightMargin: JamiTheme.preferredMarginSize + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight + color: JamiTheme.buttonTintedRed hoveredColor: JamiTheme.buttonTintedRedHovered pressedColor: JamiTheme.buttonTintedRedPressed text: JamiStrings.deleteAccount - source: JamiResources.delete_forever_24dp_svg + iconSource: JamiResources.delete_forever_24dp_svg - onClicked: { - delAccountSlot() - } + onClicked: delAccountSlot() } LinkedDevices { diff --git a/src/settingsview/components/JamiUserIdentity.qml b/src/settingsview/components/JamiUserIdentity.qml index dfecc5ef5cfa021e3838191503e8fe1948cc5baa..7dd0ac09b28566319f71740b5e6c3be7f173268d 100644 --- a/src/settingsview/components/JamiUserIdentity.qml +++ b/src/settingsview/components/JamiUserIdentity.qml @@ -172,8 +172,9 @@ ColumnLayout { Layout.alignment: Qt.AlignVCenter | Qt.AlignRight Layout.rightMargin: currentRegisteredID.width / 2 - width / 2 - Layout.preferredWidth: 120 - Layout.preferredHeight: 30 + + preferredWidth: 120 + preferredHeight: 30 visible: registeredIdNeedsSet && currentRegisteredID.nameRegistrationState === diff --git a/src/settingsview/components/KeyBoardShortcutTable.qml b/src/settingsview/components/KeyBoardShortcutTable.qml index b5843cf6f580d6d7bba390c794e454a0a86f6835..4eb49f72c2925f238cf373f7e1132bc4cd90fd3e 100644 --- a/src/settingsview/components/KeyBoardShortcutTable.qml +++ b/src/settingsview/components/KeyBoardShortcutTable.qml @@ -607,8 +607,8 @@ BaseDialog { anchors.bottomMargin: JamiTheme.preferredMarginSize anchors.horizontalCenter: parent.horizontalCenter - width: JamiTheme.preferredFieldWidth / 2 - height: JamiTheme.preferredFieldHeight + preferredWidth: JamiTheme.preferredFieldWidth / 2 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/settingsview/components/LinkDeviceDialog.qml b/src/settingsview/components/LinkDeviceDialog.qml index db1059920d869573bd9736d14d3642cc4f716db5..3afddc87af3eb1fe871a2f39872e87a38029e3d6 100644 --- a/src/settingsview/components/LinkDeviceDialog.qml +++ b/src/settingsview/components/LinkDeviceDialog.qml @@ -170,8 +170,9 @@ BaseDialog { id: btnConfirm Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -190,8 +191,9 @@ BaseDialog { id: btnCancel Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -329,8 +331,9 @@ BaseDialog { id: btnCloseExportDialog Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/settingsview/components/LinkedDevices.qml b/src/settingsview/components/LinkedDevices.qml index ebc0468cb32b5e17305dfa505b79a5f5d9e92ae2..695fe3e52d15dbe33da5eeb4c421dcad0c80a647 100644 --- a/src/settingsview/components/LinkedDevices.qml +++ b/src/settingsview/components/LinkedDevices.qml @@ -158,8 +158,8 @@ ColumnLayout { id: linkDevPushButton Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -167,7 +167,7 @@ ColumnLayout { outlined: true toolTipText: JamiStrings.tipLinkNewDevice - source: JamiResources.round_add_24dp_svg + iconSource: JamiResources.round_add_24dp_svg text: JamiStrings.linkAnotherDevice diff --git a/src/settingsview/components/LogsView.qml b/src/settingsview/components/LogsView.qml index 543eea97e929f0664e01f33c9693f65e7d0f7813..77bff4ebf4dac972f5d1ce95007c7924035987cd 100644 --- a/src/settingsview/components/LogsView.qml +++ b/src/settingsview/components/LogsView.qml @@ -150,11 +150,12 @@ Dialog { id: clearButton Layout.alignment: Qt.AlignHCenter - Layout.preferredHeight: JamiTheme.preferredFieldHeight - Layout.preferredWidth: itemWidth / widthDivisor Layout.topMargin: JamiTheme.preferredMarginSize Layout.bottomMargin: JamiTheme.preferredMarginSize + preferredWidth: itemWidth / widthDivisor + preferredHeight: JamiTheme.preferredFieldHeight + outlined: true color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -175,8 +176,9 @@ Dialog { id: copyButton Layout.alignment: Qt.AlignHCenter - Layout.preferredHeight: JamiTheme.preferredFieldHeight - Layout.preferredWidth: itemWidth/widthDivisor + + preferredWidth: itemWidth / widthDivisor + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -210,12 +212,13 @@ Dialog { id: reportButton Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: itemWidth/widthDivisor - Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.topMargin: JamiTheme.preferredMarginSize Layout.bottomMargin: JamiTheme.preferredMarginSize Layout.rightMargin: JamiTheme.preferredMarginSize + preferredWidth: itemWidth / widthDivisor + preferredHeight: JamiTheme.preferredFieldHeight + color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered pressedColor: JamiTheme.buttonTintedBlackPressed diff --git a/src/settingsview/components/NameRegistrationDialog.qml b/src/settingsview/components/NameRegistrationDialog.qml index 208a522d6d8e9aaeb94cecf5cb3edb44bd29c52c..0ae9e91dd92cc0c4e8d63deea66dc93f3e02e715 100644 --- a/src/settingsview/components/NameRegistrationDialog.qml +++ b/src/settingsview/components/NameRegistrationDialog.qml @@ -154,8 +154,9 @@ BaseDialog { id: btnRegister Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -174,8 +175,9 @@ BaseDialog { id: btnCancel Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -258,8 +260,9 @@ BaseDialog { id: btnClose Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/settingsview/components/PluginListPreferencesView.qml b/src/settingsview/components/PluginListPreferencesView.qml index f7e2a8b582a1d738095fd8a57d345d5f5d2b410a..f59bef8c52287de19ef6565bbed82678cc1d4bc8 100644 --- a/src/settingsview/components/PluginListPreferencesView.qml +++ b/src/settingsview/components/PluginListPreferencesView.qml @@ -367,20 +367,21 @@ Rectangle { RowLayout { Layout.topMargin: 10 Layout.bottomMargin: 10 - height: 30 + Layout.preferredHeight: 30 + Layout.fillWidth: true MaterialButton { id: resetButton Layout.fillWidth: true - Layout.preferredHeight: JamiTheme.preferredFieldHeight + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered pressedColor: JamiTheme.buttonTintedBlackPressed outlined: true - source: JamiResources.settings_backup_restore_24dp_svg + iconSource: JamiResources.settings_backup_restore_24dp_svg text: JamiStrings.reset @@ -391,14 +392,14 @@ Rectangle { id: uninstallButton Layout.fillWidth: true - Layout.preferredHeight: JamiTheme.preferredFieldHeight + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered pressedColor: JamiTheme.buttonTintedBlackPressed outlined: true - source: JamiResources.delete_24dp_svg + iconSource: JamiResources.delete_24dp_svg text: qsTr("Uninstall") diff --git a/src/settingsview/components/PluginListSettingsView.qml b/src/settingsview/components/PluginListSettingsView.qml index f1bbc03e2fb09470122eba3b4f2740042995ce71..39db0e9ebed8f1e7b487cf60be105e3c3643a051 100644 --- a/src/settingsview/components/PluginListSettingsView.qml +++ b/src/settingsview/components/PluginListSettingsView.qml @@ -98,17 +98,18 @@ Rectangle { id: installButton Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight Layout.topMargin: JamiTheme.preferredMarginSize / 2 + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight + color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered pressedColor: JamiTheme.buttonTintedBlackPressed outlined: true toolTipText: JamiStrings.addNewPlugin - source: JamiResources.round_add_24dp_svg + iconSource: JamiResources.round_add_24dp_svg text: JamiStrings.installPlugin diff --git a/src/settingsview/components/RecordingSettings.qml b/src/settingsview/components/RecordingSettings.qml index f233a0686611e65ac53375ccfe789e1f12c11139..12266225346220a1f13ec1fba6d526216dd992d6 100644 --- a/src/settingsview/components/RecordingSettings.qml +++ b/src/settingsview/components/RecordingSettings.qml @@ -178,12 +178,13 @@ ColumnLayout { id: recordPathButton Layout.alignment: Qt.AlignRight - Layout.preferredHeight: JamiTheme.preferredFieldHeight - Layout.preferredWidth: itemWidth + + preferredWidth: itemWidth + preferredHeight: JamiTheme.preferredFieldHeight toolTipText: JamiStrings.tipRecordFolder text: recordPath - source: JamiResources.round_folder_24dp_svg + iconSource: JamiResources.round_folder_24dp_svg color: JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedGreyHovered pressedColor: JamiTheme.buttonTintedGreyPressed diff --git a/src/settingsview/components/RevokeDevicePasswordDialog.qml b/src/settingsview/components/RevokeDevicePasswordDialog.qml index 1496d5d0ce28c81a079b37ad384dcd7293bda578..ce195c8bc68b05c9912b8f636d5f43325804d88d 100644 --- a/src/settingsview/components/RevokeDevicePasswordDialog.qml +++ b/src/settingsview/components/RevokeDevicePasswordDialog.qml @@ -93,8 +93,9 @@ BaseDialog { id: btnRemove Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -114,8 +115,9 @@ BaseDialog { id: btnCancel Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth / 2 - 8 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/settingsview/components/SettingMaterialButton.qml b/src/settingsview/components/SettingMaterialButton.qml index 187c8326c7cdfc73f1b666684e938c961a38900e..37e8ef51ba88d7dc9e2ec58c46f67ee827460915 100644 --- a/src/settingsview/components/SettingMaterialButton.qml +++ b/src/settingsview/components/SettingMaterialButton.qml @@ -64,11 +64,12 @@ RowLayout { MaterialButton { id: button - Layout.preferredWidth: root.itemWidth + Layout.fillHeight: true + preferredWidth: root.itemWidth text: root.textField - source: root.source + iconSource: root.source color: JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedGreyHovered pressedColor: JamiTheme.buttonTintedGreyPressed diff --git a/src/settingsview/components/SystemSettings.qml b/src/settingsview/components/SystemSettings.qml index cb2f0e7754829a12cde01e178cb12c7825ee8542..8318c85d9a015742c7b676f0afc693f473ec7cb6 100644 --- a/src/settingsview/components/SystemSettings.qml +++ b/src/settingsview/components/SystemSettings.qml @@ -147,12 +147,13 @@ ColumnLayout { id: downloadButton Layout.alignment: Qt.AlignRight - Layout.preferredWidth: itemWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: itemWidth + preferredHeight: JamiTheme.preferredFieldHeight toolTipText: JamiStrings.tipChooseDownloadFolder text: downloadPath - source: JamiResources.round_folder_24dp_svg + iconSource: JamiResources.round_folder_24dp_svg color: JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedGreyHovered pressedColor: JamiTheme.buttonTintedGreyPressed diff --git a/src/settingsview/components/TroubleshootSettings.qml b/src/settingsview/components/TroubleshootSettings.qml index 94d4eb2e534878246f179d5289d3e9968191af57..887487738026c2548818d8d8bfa4974c1e1092a1 100644 --- a/src/settingsview/components/TroubleshootSettings.qml +++ b/src/settingsview/components/TroubleshootSettings.qml @@ -47,8 +47,7 @@ ColumnLayout{ verticalAlignment: Text.AlignVCenter } - RowLayout{ - + RowLayout { Text{ Layout.fillWidth: true Layout.preferredHeight: 30 @@ -62,15 +61,15 @@ ColumnLayout{ verticalAlignment: Text.AlignVCenter color: JamiTheme.textColor - } MaterialButton { id: enableTroubleshootingButton Layout.alignment: Qt.AlignRight - Layout.preferredHeight: JamiTheme.preferredFieldHeight - Layout.preferredWidth: itemWidth/1.5 + + preferredWidth: itemWidth / 1.5 + preferredHeight: JamiTheme.preferredFieldHeight color: JamiTheme.buttonTintedBlack hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -79,11 +78,8 @@ ColumnLayout{ text: JamiStrings.troubleshootButton - onClicked: { - logsView.open() - } + onClicked: logsView.open() } - } } diff --git a/src/settingsview/components/UpdateSettings.qml b/src/settingsview/components/UpdateSettings.qml index 5abdb4134ae234b925bd7ff724356767cd323914..6a542629b5f0730d24213b7f27cf73df32d9f6e0 100644 --- a/src/settingsview/components/UpdateSettings.qml +++ b/src/settingsview/components/UpdateSettings.qml @@ -67,8 +67,9 @@ ColumnLayout { id: checkUpdateButton Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered @@ -87,8 +88,9 @@ ColumnLayout { visible: !UpdateManager.isCurrentVersionBeta() Layout.alignment: Qt.AlignHCenter - Layout.preferredWidth: JamiTheme.preferredFieldWidth - Layout.preferredHeight: JamiTheme.preferredFieldHeight + + preferredWidth: JamiTheme.preferredFieldWidth + preferredHeight: JamiTheme.preferredFieldHeight color: enabled? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedBlackHovered diff --git a/src/wizardview/components/BackupKeyPage.qml b/src/wizardview/components/BackupKeyPage.qml index bdb9d1f417ed63e22cc051d5768e904e9c607917..b58dce85546c3d659b408abdfc21723482beccc5 100644 --- a/src/wizardview/components/BackupKeyPage.qml +++ b/src/wizardview/components/BackupKeyPage.qml @@ -184,8 +184,8 @@ Rectangle { objectName: "backupKeyPageBackupBtn" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.backupAccountBtn color: JamiTheme.buttonTintedGrey @@ -206,8 +206,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.skip color: JamiTheme.buttonTintedGrey diff --git a/src/wizardview/components/ConnectToAccountManagerPage.qml b/src/wizardview/components/ConnectToAccountManagerPage.qml index 43236c54667d4ff48d315c8814991f6389b8e56d..08bcfaee19a127671ca016dd0b127367d50223cf 100644 --- a/src/wizardview/components/ConnectToAccountManagerPage.qml +++ b/src/wizardview/components/ConnectToAccountManagerPage.qml @@ -195,8 +195,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: errorLabel.visible ? 0 : JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth spinnerTriggeredtext: JamiStrings.creatingAccount normalText: JamiStrings.connect diff --git a/src/wizardview/components/CreateAccountPage.qml b/src/wizardview/components/CreateAccountPage.qml index f850a2b826041855b23e2e40ed6790ffb6f5dcda..bcb290879893f9d0efd52afbd22d90038ade7efb 100644 --- a/src/wizardview/components/CreateAccountPage.qml +++ b/src/wizardview/components/CreateAccountPage.qml @@ -169,10 +169,10 @@ Rectangle { objectName: "chooseUsernameButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight - fontCapitalization: Font.AllUppercase + preferredWidth: JamiTheme.wizardButtonWidth + + font.capitalization: Font.AllUppercase text: isRendezVous ? JamiStrings.chooseName : JamiStrings.chooseUsername enabled: usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.FREE color: usernameEdit.nameRegistrationState === UsernameLineEdit.NameRegistrationState.FREE ? @@ -194,8 +194,8 @@ Rectangle { objectName: "nameRegistrationPageSkipButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.skip color: JamiTheme.buttonTintedGrey @@ -348,8 +348,8 @@ Rectangle { objectName: "createAccountButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth function checkEnable() { return !passwordSwitch.checked || @@ -357,7 +357,7 @@ Rectangle { && passwordEdit.text.length !== 0) } - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase text: isRendezVous ? JamiStrings.createRV : JamiStrings.createAccount enabled: checkEnable() color: checkEnable() ? JamiTheme.wizardBlueButtons : diff --git a/src/wizardview/components/CreateSIPAccountPage.qml b/src/wizardview/components/CreateSIPAccountPage.qml index 2517b96122ea529cf8d9b66c492a66af425caf75..8aca180f87efe06646daa499ae73d7166d44c6bc 100644 --- a/src/wizardview/components/CreateSIPAccountPage.qml +++ b/src/wizardview/components/CreateSIPAccountPage.qml @@ -169,8 +169,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.createSIPAccount color: JamiTheme.wizardBlueButtons diff --git a/src/wizardview/components/ImportFromBackupPage.qml b/src/wizardview/components/ImportFromBackupPage.qml index 5929e483a15c157af628260128bb741c1025c9f6..31ae31437e53094bd940c33ab3ff6e267dbbb8c9 100644 --- a/src/wizardview/components/ImportFromBackupPage.qml +++ b/src/wizardview/components/ImportFromBackupPage.qml @@ -119,12 +119,12 @@ Rectangle { objectName: "fileImportBtn" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: fileImportBtnText toolTipText: JamiStrings.importAccountArchive - source: JamiResources.round_folder_24dp_svg + iconSource: JamiResources.round_folder_24dp_svg color: JamiTheme.buttonTintedGrey hoveredColor: JamiTheme.buttonTintedGreyHovered pressedColor: JamiTheme.buttonTintedGreyPressed @@ -204,8 +204,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: errorLabel.visible ? 0 : JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth spinnerTriggeredtext: JamiStrings.generatingAccount normalText: JamiStrings.connectFromBackup diff --git a/src/wizardview/components/ImportFromDevicePage.qml b/src/wizardview/components/ImportFromDevicePage.qml index 8d37fd3d9b60ef79747b1c0c4813d45dbc3ddd9a..d26ad109c82265e8fe67f73b768d5792b2741ec3 100644 --- a/src/wizardview/components/ImportFromDevicePage.qml +++ b/src/wizardview/components/ImportFromDevicePage.qml @@ -167,8 +167,8 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: errorLabel.visible ? 0 : JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth spinnerTriggeredtext: JamiStrings.generatingAccount normalText: JamiStrings.connectFromAnotherDevice diff --git a/src/wizardview/components/ProfilePage.qml b/src/wizardview/components/ProfilePage.qml index 87f4a592c7d026acc65f7444314906e6ffffb699..69a0fae71d95550c96e0912bf45f2109e0680ba7 100644 --- a/src/wizardview/components/ProfilePage.qml +++ b/src/wizardview/components/ProfilePage.qml @@ -177,8 +177,8 @@ Rectangle { objectName: "saveProfileBtn" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth enabled: !spinnerTriggered normalText: JamiStrings.saveProfile @@ -206,8 +206,8 @@ Rectangle { objectName: "skipProfileSavingButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.skip enabled: saveProfileBtn.enabled diff --git a/src/wizardview/components/WelcomePage.qml b/src/wizardview/components/WelcomePage.qml index 0fb452839fa683c4013c65522967c44b0433cffd..c812446c234005473d075471f55108ec98c4653f 100644 --- a/src/wizardview/components/WelcomePage.qml +++ b/src/wizardview/components/WelcomePage.qml @@ -99,16 +99,13 @@ Rectangle { objectName: "newAccountButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.createAJamiAccount - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.createNewJamiAccount - source: JamiResources.default_avatar_overlay_svg - color: JamiTheme.buttonTintedBlue - hoveredColor: JamiTheme.buttonTintedBlueHovered - pressedColor: JamiTheme.buttonTintedBluePressed + iconSource: JamiResources.default_avatar_overlay_svg KeyNavigation.tab: newRdvButton KeyNavigation.up: backButton.visible ? backButton : @@ -127,16 +124,13 @@ Rectangle { objectName: "newRdvButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.createRV - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.createNewRV - source: JamiResources.groups_24dp_svg - color: JamiTheme.buttonTintedBlue - hoveredColor: JamiTheme.buttonTintedBlueHovered - pressedColor: JamiTheme.buttonTintedBluePressed + iconSource: JamiResources.groups_24dp_svg KeyNavigation.tab: fromDeviceButton KeyNavigation.up: newAccountButton @@ -152,13 +146,13 @@ Rectangle { objectName: "fromDeviceButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.linkFromAnotherDevice - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.importAccountFromOtherDevice - source: JamiResources.devices_24dp_svg + iconSource: JamiResources.devices_24dp_svg color: JamiTheme.buttonTintedBlue hoveredColor: JamiTheme.buttonTintedBlueHovered pressedColor: JamiTheme.buttonTintedBluePressed @@ -177,13 +171,13 @@ Rectangle { objectName: "fromBackupButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.connectFromBackup - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.importAccountFromBackup - source: JamiResources.backup_24dp_svg + iconSource: JamiResources.backup_24dp_svg color: JamiTheme.buttonTintedBlue hoveredColor: JamiTheme.buttonTintedBlueHovered pressedColor: JamiTheme.buttonTintedBluePressed @@ -206,11 +200,11 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: newSIPAccountButton.visible ? 0 : JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth text: JamiStrings.advancedFeatures - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: showAdvanced ? JamiStrings.hideAdvancedFeatures : JamiStrings.showAdvancedFeatures color: JamiTheme.buttonTintedBlue @@ -238,15 +232,15 @@ Rectangle { objectName: "connectAccountManagerButton" Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth visible: false text: JamiStrings.connectJAMSServer - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.createFromJAMS - source: JamiResources.router_24dp_svg + iconSource: JamiResources.router_24dp_svg color: JamiTheme.buttonTintedBlue hoveredColor: JamiTheme.buttonTintedBlueHovered pressedColor: JamiTheme.buttonTintedBluePressed @@ -266,15 +260,15 @@ Rectangle { Layout.alignment: Qt.AlignCenter Layout.bottomMargin: JamiTheme.wizardViewPageBackButtonMargins - Layout.preferredWidth: preferredWidth - Layout.preferredHeight: preferredHeight + + preferredWidth: JamiTheme.wizardButtonWidth visible: false text: JamiStrings.addSIPAccount - fontCapitalization: Font.AllUppercase + font.capitalization: Font.AllUppercase toolTipText: JamiStrings.createNewSipAccount - source: JamiResources.default_avatar_overlay_svg + iconSource: JamiResources.default_avatar_overlay_svg color: JamiTheme.buttonTintedBlue hoveredColor: JamiTheme.buttonTintedBlueHovered pressedColor: JamiTheme.buttonTintedBluePressed