diff --git a/src/app/commoncomponents/JamiIdentifier.qml b/src/app/commoncomponents/JamiIdentifier.qml index cc75f654b765d37cfb02d4633dc01839e55a6d65..5cba708d9f5a3f17ac9ce679ebc6c66940076fd5 100644 --- a/src/app/commoncomponents/JamiIdentifier.qml +++ b/src/app/commoncomponents/JamiIdentifier.qml @@ -26,6 +26,7 @@ Item { id: jamiId property bool slimDisplay: true property color backgroundColor: JamiTheme.welcomeBlockColor + property color contentColor: JamiTheme.tintedBlue height: getHeight() function getHeight() { @@ -68,7 +69,7 @@ Item { containerWidth: 40 Layout.leftMargin: JamiTheme.pushButtonMargins source: JamiResources.jami_id_logo_svg - color: JamiTheme.tintedBlue + color: jamiId.contentColor } UsernameTextEdit { @@ -76,7 +77,7 @@ Item { Layout.fillWidth: true Layout.preferredHeight: 40 Layout.alignment: Qt.AlignVCenter - textColor: JamiTheme.tintedBlue + textColor: jamiId.contentColor fontPixelSize: staticText.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.jamiIdFontSize editMode: false isPersistent: false @@ -125,8 +126,8 @@ Item { id: btnEdit anchors.leftMargin: JamiTheme.pushButtonMargins visible: CurrentAccount.registeredName === "" - border.color: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack - imageColor: enabled ? JamiTheme.buttonTintedBlue : JamiTheme.buttonTintedBlack + border.color: enabled ? jamiId.contentColor : JamiTheme.buttonTintedBlack + imageColor: enabled ? jamiId.contentColor : JamiTheme.buttonTintedBlack enabled: { if (!usernameTextEdit.editMode) return true; @@ -198,8 +199,8 @@ Item { //hoveredColor: JamiTheme.hoveredButtonColorWizard imageContainerWidth: JamiTheme.pushButtonSize imageContainerHeight: JamiTheme.pushButtonSize - border.color: JamiTheme.tintedBlue - imageColor: JamiTheme.buttonTintedBlue + border.color: jamiId.contentColor + imageColor: jamiId.contentColor duration: 0 } } diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml index 08fd5f7563f4d9d2807a85ae49bf85bca8aa6083..7e459c6d836d637115e5d7f81cfb890f2db04b77 100644 --- a/src/app/constant/JamiTheme.qml +++ b/src/app/constant/JamiTheme.qml @@ -60,7 +60,9 @@ Item { property color whiteColor: "#ffffff" property color darkGreyColor: "#272727" property color darkGreyColorOpacity: "#be272727" // 77% - property color tintedBlue: darkTheme ? "#03B9E9" : "#005699" + property color tintedBlue: darkTheme ? lightTintedBlue : darkTintedBlue + property color lightTintedBlue:"#03B9E9" + property color darkTintedBlue: "#005699" property color sysColor: "#F0EFEF" property color transparentColor: "transparent" diff --git a/src/app/mainview/components/BackupTipBox.qml b/src/app/mainview/components/BackupTipBox.qml index 056391e06ad32d9e00e07f60bb1c36537d86a037..7cad94f4869c94cc1da82d904715deea822fe7ee 100644 --- a/src/app/mainview/components/BackupTipBox.qml +++ b/src/app/mainview/components/BackupTipBox.qml @@ -34,6 +34,9 @@ Item { property real maxHeight: 250 + property color textColor: JamiTheme.textColor + property color iconColor: JamiTheme.tintedBlue + signal ignore ColumnLayout { @@ -62,13 +65,13 @@ Item { containerWidth: Layout.preferredWidth source: JamiResources.backup_svg - color: JamiTheme.buttonTintedBlue + color: root.iconColor } Text { id: title text: JamiStrings.backupAccountBtn - color: JamiTheme.textColor + color: root.textColor font.weight: Font.Medium Layout.topMargin: root.margin Layout.alignment: Qt.AlignLeft @@ -90,7 +93,7 @@ Item { wrapMode: Text.WordWrap font.weight: Font.Normal text: JamiStrings.whyBackupAccount - color: JamiTheme.textColor + color: root.textColor horizontalAlignment: Text.AlignLeft } @@ -107,7 +110,7 @@ Item { visible: opened wrapMode: Text.WordWrap text: JamiStrings.backupAccountInfos - color: JamiTheme.textColor + color: root.textColor horizontalAlignment: Text.AlignLeft linkColor: JamiTheme.buttonTintedBlue diff --git a/src/app/mainview/components/CustomizeTipBox.qml b/src/app/mainview/components/CustomizeTipBox.qml index d6d61a90d660441b1757c14cbbf0e569d5fd0841..0210d4a28636af13f9c2cf723ac3c377e8b9de50 100644 --- a/src/app/mainview/components/CustomizeTipBox.qml +++ b/src/app/mainview/components/CustomizeTipBox.qml @@ -30,6 +30,10 @@ ColumnLayout { property var margin: 5 property var prefWidth: 170 property bool opened: root.opened + + property color textColor: JamiTheme.textColor + property color iconColor: JamiTheme.tintedBlue + focus: true onOpenedChanged: { @@ -56,13 +60,13 @@ ColumnLayout { containerWidth: Layout.preferredWidth source: JamiResources.noun_paint_svg - color: JamiTheme.buttonTintedBlue + color: column.iconColor focus: activeFocus } Label { text: JamiStrings.customize - color: JamiTheme.textColor + color: column.textColor font.weight: Font.Medium Layout.topMargin: column.margin Layout.preferredWidth: column.prefWidth - 2 * column.margin - column.iconSize @@ -85,7 +89,7 @@ ColumnLayout { wrapMode: Text.WordWrap font.weight: Font.Normal text: JamiStrings.customizeText - color: JamiTheme.textColor + color: column.textColor } PhotoboothView { @@ -125,6 +129,6 @@ ColumnLayout { visible: opened wrapMode: Text.WordWrap text: JamiStrings.customizationDescription2 - color: JamiTheme.textColor + color: column.textColor } } diff --git a/src/app/mainview/components/InformativeTipBox.qml b/src/app/mainview/components/InformativeTipBox.qml index 255c69afb20516c832bf263a2e219001db59eb9f..46aa2cd876254520b02f299e9dfd40567e589939 100644 --- a/src/app/mainview/components/InformativeTipBox.qml +++ b/src/app/mainview/components/InformativeTipBox.qml @@ -32,6 +32,9 @@ ColumnLayout { property var margin: 5 property var prefWidth: 170 + property color textColor: JamiTheme.textColor + property color iconColor: JamiTheme.tintedBlue + RowLayout { id: rowlayout Layout.preferredHeight: opened ? 0 : childrenRect.height @@ -52,12 +55,12 @@ ColumnLayout { containerWidth: Layout.preferredWidth source: JamiResources.glasses_tips_svg - color: JamiTheme.buttonTintedBlue + color: column.iconColor } Label { text: JamiStrings.tip - color: JamiTheme.textColor + color: column.textColor font.weight: Font.Medium Layout.topMargin: column.margin visible: !opened @@ -82,7 +85,7 @@ ColumnLayout { font.weight: opened ? Font.Medium : Font.Normal text: root.title horizontalAlignment: Text.AlignLeft - color: JamiTheme.textColor + color: column.textColor } JamiFlickable { @@ -99,7 +102,7 @@ ColumnLayout { wrapMode: Text.WordWrap text: root.description horizontalAlignment: Text.AlignLeft - color: JamiTheme.textColor + color: column.textColor } } } diff --git a/src/app/mainview/components/TipBox.qml b/src/app/mainview/components/TipBox.qml index e610161b6adb1a57bb8e038334f1004073b5bf8f..d10f47604cdafc2033cf0f5affef696092406245 100644 --- a/src/app/mainview/components/TipBox.qml +++ b/src/app/mainview/components/TipBox.qml @@ -34,6 +34,9 @@ FocusScope { property bool clicked: false property bool opened: activeFocus property color backgroundColor: JamiTheme.welcomeBlockColor + property color textColor: JamiTheme.textColor + property color iconColor: JamiTheme.tintedBlue + property string customizeTip: "CustomizeTipBox {}" @@ -53,6 +56,7 @@ FocusScope { focus: true activeFocusOnTab: true + Rectangle { id: rect anchors.fill: parent @@ -77,6 +81,8 @@ FocusScope { root.ignoreClicked(); } maxHeight: root.maximumHeight + textColor: root.textColor + iconColor: root.iconColor } width: parent.width } @@ -84,17 +90,23 @@ FocusScope { id: loader_customizeTip active: type === "customize" sourceComponent: CustomizeTipBox { + textColor: root.textColor + iconColor: root.iconColor } width: parent.width focus: true + } Loader { id: loader_infoTip active: type === "tip" sourceComponent: InformativeTipBox { maxHeight: root.maximumHeight + textColor: root.textColor + iconColor: root.iconColor } width: parent.width + } } } @@ -148,7 +160,7 @@ FocusScope { visible: opened circled: true - imageColor: JamiTheme.tintedBlue + imageColor: root.iconColor normalColor: "transparent" toolTipText: JamiStrings.dismiss diff --git a/src/app/mainview/components/TipsRow.qml b/src/app/mainview/components/TipsRow.qml index af5f4675bd9db6c75ab2438f3ac7b12b5cca5c8a..d230a256b9b3c0512c46c444d99691dba98dc227 100644 --- a/src/app/mainview/components/TipsRow.qml +++ b/src/app/mainview/components/TipsRow.qml @@ -29,6 +29,9 @@ JamiFlickable { clip: false property color tipsColor: JamiTheme.welcomeBlockColor + property color tipsTextColor: JamiTheme.textColor + property color iconColor: JamiTheme.tintedBlue + width: JamiTheme.welcomeGridWidth height: getHeight() function getHeight() { @@ -56,6 +59,8 @@ JamiFlickable { type: Type property bool hideTipBox: false anchors.bottom: row.bottom + textColor:tipsTextColor + iconColor: tipsRow.iconColor visible: { if (hideTipBox) diff --git a/src/app/mainview/components/WelcomeInfo.qml b/src/app/mainview/components/WelcomeInfo.qml index 356b18be5403af163f95e31ec72c16a62c8b0499..c13e252c5d755f5bf81b03a09d5ad8575f72c48a 100644 --- a/src/app/mainview/components/WelcomeInfo.qml +++ b/src/app/mainview/components/WelcomeInfo.qml @@ -28,7 +28,9 @@ Item { id: welcomeInfo property color backgroundColor: "transparent" + property color textColor: JamiTheme.textColor property color idColor: JamiTheme.welcomeBlockColor + property color contentIdColor: JamiTheme.tintedBlue property bool hasTitle: true property bool hasDescription: true @@ -37,6 +39,8 @@ Item { property real contentWidth: welcomeInfo.width - 2 * JamiTheme.mainViewMargin + + function getHeight() { return bgRect.height; } @@ -88,6 +92,8 @@ Item { objectName: "loader_bottomIdentifier" sourceComponent: JamiIdentifier { backgroundColor: welcomeInfo.idColor + contentColor: contentIdColor + } Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: active ? item.getHeight() : 0 @@ -113,7 +119,7 @@ Item { font.pixelSize: JamiTheme.bigFontSize wrapMode: Text.WordWrap text: welcomeInfo.title - color: JamiTheme.textColor + color: welcomeInfo.textColor textFormat: TextEdit.PlainText horizontalAlignment: Text.AlignHCenter } @@ -133,7 +139,7 @@ Item { text: welcomeInfo.description lineHeight: 1.25 - color: JamiTheme.textColor + color: welcomeInfo.textColor textFormat: TextEdit.PlainText horizontalAlignment: Text.AlignHCenter } @@ -151,7 +157,7 @@ Item { wrapMode: Text.WordWrap text: JamiStrings.description - color: JamiTheme.textColor + color: welcomeInfo.textColor textFormat: TextEdit.PlainText horizontalAlignment: Text.AlignHCenter } diff --git a/src/app/mainview/components/WelcomePage.qml b/src/app/mainview/components/WelcomePage.qml index 1663bfbf313d1e6214cefb9b55dff789df543c1f..ad3b01975852f723f662f47247531da0bc338bdc 100644 --- a/src/app/mainview/components/WelcomePage.qml +++ b/src/app/mainview/components/WelcomePage.qml @@ -81,6 +81,11 @@ ListSelectionView { property color mainBoxColor: "transparent" + property color tipsTextColor: JamiTheme.textColor + property color mainBoxTextColor: JamiTheme.textColor + property color contentTipAndIdColor: JamiTheme.tintedBlue + + function updateUiFlags() { hasCustomUi = Object.keys(uiCustomization).length > 0; hasTitle = hasCustomUi ? uiCustomization.title !== "" : true; @@ -101,6 +106,9 @@ ListSelectionView { logoSize = (hasCustomUi && uiCustomization.logoSize !== undefined) ? uiCustomization.logoSize / 100 : 1; tipBoxAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? uiCustomization.tipBoxAndIdColor : JamiTheme.welcomeBlockColor; mainBoxColor = (hasCustomUi && uiCustomization.mainBoxColor !== undefined) ? uiCustomization.mainBoxColor : "transparent"; + tipsTextColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? (UtilsAdapter.luma(tipBoxAndIdColor)? JamiTheme.whiteColor : JamiTheme.blackColor) : JamiTheme.textColor; + mainBoxTextColor = (hasCustomUi && uiCustomization.mainBoxColor !== undefined) ? (UtilsAdapter.luma(mainBoxColor)? JamiTheme.whiteColor : JamiTheme.blackColor) : JamiTheme.textColor; + contentTipAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? (UtilsAdapter.luma(tipBoxAndIdColor)? JamiTheme.lightTintedBlue : JamiTheme.darkTintedBlue) : JamiTheme.tintedBlue; } rightPaneItem: JamiFlickable { @@ -135,8 +143,11 @@ ListSelectionView { Connections { target: JamiTheme function onDarkThemeChanged() { - cachedImgLogo.downloadUrl = hasCustomBgImage ? customBgUrl : JamiTheme.welcomeBg; + customBgUrl = hasCustomBgImage ? customBgUrl : JamiTheme.welcomeBg; tipBoxAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? uiCustomization.tipBoxAndIdColor : JamiTheme.welcomeBlockColor; + tipsTextColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? (UtilsAdapter.luma(tipBoxAndIdColor)? JamiTheme.whiteColor : JamiTheme.blackColor) : JamiTheme.textColor; + mainBoxTextColor = (hasCustomUi && uiCustomization.mainBoxColor !== undefined) ? (UtilsAdapter.luma(mainBoxColor)? JamiTheme.whiteColor : JamiTheme.blackColor) : JamiTheme.textColor; + contentTipAndIdColor = (hasCustomUi && uiCustomization.tipBoxAndIdColor !== undefined) ? (UtilsAdapter.luma(tipBoxAndIdColor)? JamiTheme.lightTintedBlue : JamiTheme.darkTintedBlue) : JamiTheme.tintedBlue; } } } @@ -177,6 +188,8 @@ ListSelectionView { title: viewNode.title description: viewNode.description idColor: viewNode.tipBoxAndIdColor + textColor: mainBoxTextColor + contentIdColor: viewNode.contentTipAndIdColor } Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: item.getHeight() @@ -191,6 +204,8 @@ ListSelectionView { active: viewNode.hasTips && root.height > root.thresholdHeight sourceComponent: TipsRow { tipsColor: viewNode.tipBoxAndIdColor + tipsTextColor: viewNode.tipsTextColor + iconColor: viewNode.contentTipAndIdColor } Layout.alignment: Qt.AlignHCenter Layout.preferredHeight: active ? item.getHeight() : 0