From e8217097286cb2f4bfb684726e62b3cf72e34020 Mon Sep 17 00:00:00 2001 From: Fadi SHEHADEH Date: Mon, 4 Jul 2022 11:35:21 -0400 Subject: [PATCH] about Jami: window style and content - changed flickable window to rectangle - font size - window radius - hyperlink to company name - changed escription - added close button - deleted html reformating after file load and added it directly to the html file containing the credits Change-Id: I7805ddead153c9be4d66e7789e754ba2c3cc20a7 Gitlab: #731 --- resources/misc/projectcredits.html | 112 ++++++------- src/app/commoncomponents/JamiFlickable.qml | 2 +- src/app/constant/JamiStrings.qml | 24 +-- src/app/constant/JamiTheme.qml | 12 +- src/app/mainview/components/AboutPopUp.qml | 147 ++++++++---------- .../components/ProjectCreditsScrollView.qml | 13 +- src/app/utils.cpp | 27 +--- .../components/CreateAccountPage.qml | 2 +- src/app/wizardview/components/WelcomePage.qml | 2 +- 9 files changed, 157 insertions(+), 184 deletions(-) diff --git a/resources/misc/projectcredits.html b/resources/misc/projectcredits.html index 29f0b3b9b..f905114eb 100644 --- a/resources/misc/projectcredits.html +++ b/resources/misc/projectcredits.html @@ -1,56 +1,56 @@ -Created by: -

Adrien Béraud

-

Albert Babí

-

Alexandre Lision

-

Alexandr Sergheev

-

Alexandre Viau

-

Aline Bonnet

-

Aline Gondim Santos

-

Amin Bandali

-

AmirHossein Naghshzan

-

Andreas Traczyk

-

Anthony Léonard

-

Brando Tovar

-

Cyrille Béraud

-

Dorina Mosku

-

Eden Abitbol

-

Édric Milaret

-

Éloi Bail

-

Emmanuel Lepage-Vallée

-

Frédéric Guimont

-

Guillaume Heller

-

Guillaume Roguez

-

Hadrien De Sousa

-

Hugo Lefeuvre

-

Julien Grossholtz

-

Kateryna Kostiuk

-

Loïc Siret

-

Mingrui Zhang

-

Mohamed Chibani

-

Mohamed Amine Younes Bouacida

-

Nicolas Jäger

-

Nicolas Reynaud

-

Olivier Gregoire

-

Olivier Soldano

-

Patrick Keroulas

-

Peymane Marandi

-

Philippe Gorley

-

Pierre Duchemin

-

Pierre Lespagnol

-

Raphaël Brulé

-

Rayan Osseiran

-

Romain Bertozzi

-

Saher Azer

-

Sébastien Blin

-

Silbino Gonçalves Matado

-

Simon Désaulniers

-

Simon Zeni

-

Stepan Salenikovich

-

Thibault Wittemberg

-

Trevor Tabah

-

Vsevolod Ivanov

-

Yang Wang

-Artwork by: -

Charlotte Hoffmann

-

Marianne Forget

-


+

CREATED BY:

+

Adrien Béraud
+Albert Babí
+Alexandre Lision
+Alexandr Sergheev
+Alexandre Viau
+Aline Bonnet
+Aline Gondim Santos
+Amin Bandali
+AmirHossein Naghshzan
+Andreas Traczyk
+Anthony Léonard
+Brando Tovar
+Cyrille Béraud
+Dorina Mosku
+Eden Abitbol
+Édric Milaret
+Éloi Bail
+Emmanuel Lepage-Vallée
+Fadi Shehadeh
+Frédéric Guimont
+Guillaume Heller
+Guillaume Roguez
+Hadrien De Sousa
+Hugo Lefeuvre
+Julien Grossholtz
+Kateryna Kostiuk
+Loïc Siret
+Mingrui Zhang
+Mohamed Chibani
+Mohamed Amine Younes Bouacida
+Nicolas Jäger
+Nicolas Reynaud
+Olivier Gregoire
+Olivier Soldano
+Patrick Keroulas
+Peymane Marandi
+Philippe Gorley
+Pierre Duchemin
+Pierre Lespagnol
+Raphaël Brulé
+Rayan Osseiran
+Romain Bertozzi
+Saher Azer
+Sébastien Blin
+Silbino Gonçalves Matado
+Simon Désaulniers
+Simon Zeni
+Stepan Salenikovich
+Thibault Wittemberg
+Trevor Tabah
+Vsevolod Ivanov
+Yang Wang

+

ARTWORK BY:

+

Charlotte Hoffmann
+Marianne Forget

diff --git a/src/app/commoncomponents/JamiFlickable.qml b/src/app/commoncomponents/JamiFlickable.qml index de1a88b1b..d602ebc2c 100644 --- a/src/app/commoncomponents/JamiFlickable.qml +++ b/src/app/commoncomponents/JamiFlickable.qml @@ -24,6 +24,7 @@ import net.jami.Constants 1.1 Flickable { id: root + property bool attachedFlickableMoving: root.moving property alias verticalHandleColor: verticalScrollBar.handleColor property alias horizontalHandleColor: horizontalScrollBar.handleColor @@ -38,7 +39,6 @@ Flickable { } ScrollBar.horizontal: JamiScrollBar { id: horizontalScrollBar - attachedFlickableMoving: root.attachedFlickableMoving orientation: Qt.Horizontal } diff --git a/src/app/constant/JamiStrings.qml b/src/app/constant/JamiStrings.qml index de071689f..9377704a6 100644 --- a/src/app/constant/JamiStrings.qml +++ b/src/app/constant/JamiStrings.qml @@ -40,15 +40,17 @@ Item { property string createASwarm: qsTr("Create a swarm") property string contactSearchInvitations: qsTr("Search your invitations") property string invitations: qsTr("Invitations") - property string description: qsTr("Jami is free software for universal communication which respects the freedoms and the privacy of its users.") + property string description: qsTr("Jami is a universal communication platform, with privacy as its foundation, that relies on a free distributed network for everyone.") property string contactLeft: qsTr("You are viewing a conversation where all participants other than you have left. New interactions will not be possible.") property string newConversation: qsTr("Start new conversation") // AboutPopUp property string version: qsTr("Version") + (UpdateManager.isCurrentVersionBeta() ? " (BETA)" : "") - property string companyDeclarationYear: "© 2015-2022 Savoir-faire Linux Inc." + property string companyDeclarationYear: declarationYear + " " + companyName + property string declarationYear: "© 2015-2022" + property string companyName: "Savoir-faire Linux Inc." property string slogan: "Taranis" - property string declaration: qsTr("Jami is a free software for universal communication which respects the freedom and privacy of its users.") + property string declaration: qsTr("Jami is a free universal communication software that respects the freedom and privacy of its users.") property string credits: qsTr("Credits") // AccountComboBox @@ -298,12 +300,11 @@ Item { property string chooseName: qsTr("Choose name") property string chooseUsername: qsTr("Choose username") property string createPassword: qsTr("Encrypt account with password") - property string createRV: qsTr("Create a rendezvous point") property string createAccount: qsTr("Create account") property string confirmPassword: qsTr("Confirm password") property string notePasswordRecovery: qsTr("Choose a password to encrypt your account on this device. Note that the password cannot be recovered.") property string optional: qsTr("Optional") - property string chooseUsernameForAccount: qsTr("Choose a username for your account") + property string chooseUsernameForAccount: qsTr("You can choose a username to be easily found and reached on Jami.") property string chooseUsernameForRV: qsTr("Choose a name for your rendezvous point") property string chooseAName: qsTr("Choose a name") property string chooseYourUserName: qsTr("Choose your username") @@ -540,21 +541,26 @@ Item { // WelcomePage property string shareInvite: qsTr("This is your Jami username.\nCopy and share it with your friends!") property string linkFromAnotherDevice: qsTr("Link this device to an existing account") - property string importAccountFromOtherDevice: qsTr("Import account from other device") - property string importAccountFromBackup: qsTr("Import account from backup file") + property string importAccountFromOtherDevice: qsTr("Import from another device") + property string importAccountFromBackup: qsTr("Import from an archive backup") property string advancedFeatures: qsTr("Advanced features") property string showAdvancedFeatures: qsTr("Show advanced features") property string hideAdvancedFeatures: qsTr("Hide advanced features") property string connectJAMSServer: qsTr("Connect to a JAMS server") property string createFromJAMS: qsTr("Create account from Jami Account Management Server (JAMS)") - property string addSIPAccount: qsTr("Add a SIP account") + property string addSIPAccount: qsTr("Configure a SIP account") property string errorCreateAccount: qsTr("Error while creating your account. Check your credentials.") - property string createNewRV: qsTr("Create new rendezvous point") + property string createNewRV: qsTr("Create a rendezvous point") property string createAJamiAccount: qsTr("Create a Jami account") + property string joinJami: qsTr("Join Jami") property string createNewJamiAccount: qsTr("Create new Jami account") property string createNewSipAccount: qsTr("Create new SIP account") property string aboutJami: qsTr("About Jami") property string welcomeTo: qsTr("Welcome to") + property string introductionJami: qsTr("Share, freely and privately with Jami") + property string alreadyHaveAccount: qsTr("I already have an account") + property string useExistingAccount: qsTr("Use existing Jami account") + property string recommendationMessage: qsTr("Here are some recommendations to improve your experience on Jami") // SmartList property string clearText: qsTr("Clear Text") diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml index a654aee73..9c7af7efa 100644 --- a/src/app/constant/JamiTheme.qml +++ b/src/app/constant/JamiTheme.qml @@ -40,6 +40,7 @@ Item { property color whiteColor: "#ffffff" property color darkGreyColor: "#272727" property color darkGreyColorOpacity: "#be272727" // 77% + property color tintedBlue: "#005699" property color transparentColor: "transparent" property color primaryForegroundColor: darkTheme ? whiteColor : blackColor @@ -102,6 +103,8 @@ Item { property color whiteColorTransparent: rgba256(255, 255, 255, 50) property color raiseHandColor: rgba256(0, 184, 255, 77) + + property color closeButtonLighterBlack: "#4c4c4c" // Jami switch @@ -215,8 +218,6 @@ Item { property int overlayFadeDuration: 250 property int smartListTransitionDuration: 120 - property string chatviewFontFamily : 'Ubuntu' - // Sizes property real qrCodeImageSize: 256 @@ -224,12 +225,15 @@ Item { property real indicatorFontSize: 6 property real tinyFontSize: 7 + fontSizeOffset property real textFontSize: 9 + fontSizeOffset + property real bigFontSize: 22 property real settingsFontSize: 11 + fontSizeOffset property real buttonFontSize: 9 property real participantFontSize: 10 property real menuFontSize: 12 + fontSizeOffset property real headerFontSize: 13 + fontSizeOffset property real titleFontSize: 16 + fontSizeOffset + property real tinyCreditsTextSize: 13 + fontSizeOffset + property real creditsTextSize: 15 + fontSizeOffset property real primaryRadius: 4 property real smartlistItemFontSize: 10.5 + fontSizeOffset property real smartlistItemInfoFontSize: 9 + fontSizeOffsetSmall @@ -241,6 +245,8 @@ Item { property real smartListAvatarSize: 52 property real avatarSizeInCall: 130 property real aboutButtonPreferredWidth: 150 + property real aboutLogoPreferredWidth: 183 + property real aboutLogoPreferredHeight: 61 property real callButtonPreferredSize: 50 property real contextMenuItemTextPreferredWidth: 152 property real contextMenuItemTextMaxWidth: 182 @@ -297,7 +303,7 @@ Item { property real switchIndicatorPreferredWidth: 26 // Modal Popup - property real modalPopupRadius: 4 + property real modalPopupRadius: 20 // MessageWebView property real chatViewHairLineSize: 1 diff --git a/src/app/mainview/components/AboutPopUp.qml b/src/app/mainview/components/AboutPopUp.qml index 8bfa16a20..e7c583492 100644 --- a/src/app/mainview/components/AboutPopUp.qml +++ b/src/app/mainview/components/AboutPopUp.qml @@ -19,20 +19,25 @@ import QtQuick import QtQuick.Controls import QtQuick.Layouts +import Qt5Compat.GraphicalEffects import net.jami.Models 1.1 import net.jami.Adapters 1.1 import net.jami.Constants 1.1 + import "../../commoncomponents" BaseModalDialog { id: root - popupContent: JamiFlickable { + width: 488 + height: 560 + + popupContent: Rectangle { id: aboutPopUpScrollView - contentHeight: aboutPopUpContentRectColumnLayout.implicitHeight + color: JamiTheme.transparentColor width: root.width ColumnLayout { @@ -41,26 +46,66 @@ BaseModalDialog { width: root.width height: Math.max(aboutPopUpScrollView.height, implicitHeight) + PushButton { + id: btnCancel + + Layout.alignment: Qt.AlignRight + + imageColor: "grey" + normalColor: "transparent" + Layout.topMargin: 10 + Layout.rightMargin: 10 + + source: JamiResources.round_close_24dp_svg + + onClicked: { close();} + } + ResponsiveImage { id: aboutPopUPJamiLogoImage Layout.alignment: Qt.AlignCenter Layout.topMargin: JamiTheme.preferredMarginSize - Layout.preferredWidth: 250 - Layout.preferredHeight: 88 + Layout.preferredWidth: JamiTheme.aboutLogoPreferredWidth + Layout.preferredHeight: JamiTheme.aboutLogoPreferredHeight + height: 10 source: JamiTheme.darkTheme ? JamiResources.logo_jami_standard_coul_white_svg : JamiResources.logo_jami_standard_coul_svg } + Label { + id: jamiSlogansText + + Layout.alignment: Qt.AlignCenter + Layout.preferredWidth: aboutPopUpScrollView.width + Layout.preferredHeight: textMetricsjamiSlogansText.boundingRect.height + Layout.topMargin: 26 + + wrapMode: Text.WordWrap + font.pixelSize: JamiTheme.bigFontSize + + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + + text: textMetricsjamiSlogansText.text + color: JamiTheme.tintedBlue + + TextMetrics { + id: textMetricsjamiSlogansText + font: jamiSlogansText.font + text: JamiStrings.slogan + } + } + MaterialLineEdit { id: jamiVersionText Layout.alignment: Qt.AlignCenter Layout.preferredWidth: aboutPopUpScrollView.width - font.pointSize: JamiTheme.textFontSize + font.pixelSize: JamiTheme.tinyCreditsTextSize padding: 0 readOnly: true @@ -73,40 +118,17 @@ BaseModalDialog { verticalAlignment: Text.AlignVCenter } - Label { - id: jamiSlogansText - - Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: aboutPopUpScrollView.width - Layout.preferredHeight: textMetricsjamiSlogansText.boundingRect.height - Layout.topMargin: 5 - - wrapMode: Text.WordWrap - font.pointSize: JamiTheme.textFontSize - - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - text: textMetricsjamiSlogansText.text - color: JamiTheme.textColor - - TextMetrics { - id: textMetricsjamiSlogansText - font: jamiSlogansText.font - text: JamiStrings.slogan - } - } Label { id: jamiDeclarationText Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: aboutPopUpScrollView.width + Layout.preferredWidth: aboutPopUpScrollView.width - JamiTheme.preferredMarginSize * 2 Layout.preferredHeight: 40 - Layout.topMargin: 5 + Layout.topMargin: 15 wrapMode: Text.WordWrap - font.pointSize: JamiTheme.textFontSize + font.pixelSize: JamiTheme.creditsTextSize color: JamiTheme.textColor horizontalAlignment: Text.AlignHCenter @@ -124,11 +146,11 @@ BaseModalDialog { // Strangely, hoveredLink works badly when width grows too large Layout.preferredWidth: 50 Layout.preferredHeight: textMetricsjamiDeclarationHyperText.boundingRect.height - Layout.topMargin: 5 - Layout.bottomMargin: 5 + Layout.topMargin: 15 + color: JamiTheme.textColor - font.pointSize: JamiTheme.textFontSize + font.pixelSize: JamiTheme.creditsTextSize horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter @@ -150,42 +172,19 @@ BaseModalDialog { } } - Label { - id: jamiDeclarationYearText - - Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: aboutPopUpScrollView.width - Layout.preferredHeight: textMetricsjamiDeclarationYearText.boundingRect.height - Layout.bottomMargin: 5 - - font.pointSize: JamiTheme.textFontSize - color: JamiTheme.textColor - - horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter - - text: textMetricsjamiDeclarationYearText.text - - TextMetrics { - id: textMetricsjamiDeclarationYearText - font: jamiDeclarationYearText.font - text: JamiStrings.companyDeclarationYear - } - } - Label { id: jamiNoneWarrantyHyperText Layout.alignment: Qt.AlignCenter - Layout.preferredWidth: 300 + Layout.preferredWidth: 390 Layout.preferredHeight: textMetricsjamiNoneWarrantyHyperText.boundingRect.height * 2 - Layout.bottomMargin: 10 - + Layout.topMargin: 15 + lineHeight: 1.2 wrapMode: Text.WordWrap - font.pointSize: JamiTheme.tinyFontSize + font.pixelSize: JamiTheme.tinyCreditsTextSize horizontalAlignment: Text.AlignHCenter - verticalAlignment: Text.AlignVCenter + verticalAlignment: Text.AlignTop color: JamiTheme.textColor text: textMetricsjamiNoneWarrantyHyperText.text @@ -194,7 +193,8 @@ BaseModalDialog { TextMetrics { id: textMetricsjamiNoneWarrantyHyperText font: jamiDeclarationHyperText.font - text: 'This program comes with absolutely no warranty.See the GNU General Public License, version 3 or later for details.' + text: JamiStrings.declarationYear + " " + 'Savoir-faire Linux Inc.
' + + 'This program comes with absolutely no warranty. See the GNU General Public License, version 3 or later for details.' } MouseArea { @@ -206,30 +206,13 @@ BaseModalDialog { ProjectCreditsScrollView { id: projectCreditsScrollView - Layout.alignment: Qt.AlignCenter Layout.preferredWidth: aboutPopUpScrollView.width - JamiTheme.preferredMarginSize * 2 - Layout.preferredHeight: 128 + Layout.preferredHeight: 100 + Layout.topMargin: 25 Layout.margins: JamiTheme.preferredMarginSize } - MaterialButton { - id: btnClose - - Layout.alignment: Qt.AlignHCenter - Layout.bottomMargin: JamiTheme.preferredMarginSize - - preferredWidth: JamiTheme.preferredFieldWidth / 2 - preferredHeight: JamiTheme.preferredFieldHeight - - text: JamiStrings.close - color: enabled ? JamiTheme.buttonTintedBlack : JamiTheme.buttonTintedGrey - hoveredColor: JamiTheme.buttonTintedBlackHovered - pressedColor: JamiTheme.buttonTintedBlackPressed - outlined: true - - onClicked: close() - } } } } diff --git a/src/app/mainview/components/ProjectCreditsScrollView.qml b/src/app/mainview/components/ProjectCreditsScrollView.qml index 0a9c09d0e..59876f554 100644 --- a/src/app/mainview/components/ProjectCreditsScrollView.qml +++ b/src/app/mainview/components/ProjectCreditsScrollView.qml @@ -27,10 +27,8 @@ import "../../commoncomponents" Rectangle { id: root - - radius: 5 - border.color: JamiTheme.tabbarBorderColor - + color: "transparent" + width : 480 JamiFlickable { id: projectCreditsFlickable @@ -44,7 +42,7 @@ Rectangle { horizontalAlignment: Text.AlignHCenter width: projectCreditsFlickable.width - + color: JamiTheme.textColor selectByMouse: false readOnly: true wrapMode: Text.WordWrap @@ -59,6 +57,11 @@ Rectangle { cursorShape: Qt.ArrowCursor acceptedButtons: Qt.NoButton } + } } + + + + } diff --git a/src/app/utils.cpp b/src/app/utils.cpp index 5422c4278..f4b13b22f 100644 --- a/src/app/utils.cpp +++ b/src/app/utils.cpp @@ -565,38 +565,13 @@ Utils::forceDeleteAsync(const QString& path) QString Utils::getProjectCredits() { - QString credits; QFile projectCreditsFile(":/misc/projectcredits.html"); if (!projectCreditsFile.open(QIODevice::ReadOnly | QIODevice::Text)) { qDebug().noquote() << " Project Credits failed to load"; return {}; } QTextStream in(&projectCreditsFile); - while (!in.atEnd()) { - QString currentLine = in.readLine(); - if (currentLine.contains("Created by:")) { - credits += "

" - + QObject::tr("Created by:") + "

"; - continue; - } else if (currentLine.contains("Artwork by:")) { - credits - += "

") - + "" + QObject::tr("Artwork by:") - + "

"; - continue; - } - credits += currentLine; - } - credits += "

") - + QObject::tr("Based on the SFLPhone project") + "

"; - - return credits; + return in.readAll(); } inline QString diff --git a/src/app/wizardview/components/CreateAccountPage.qml b/src/app/wizardview/components/CreateAccountPage.qml index de766bcb6..701cf2e6b 100644 --- a/src/app/wizardview/components/CreateAccountPage.qml +++ b/src/app/wizardview/components/CreateAccountPage.qml @@ -371,7 +371,7 @@ Rectangle { } font.capitalization: Font.AllUppercase - text: isRendezVous ? JamiStrings.createRV : JamiStrings.createAccount + text: isRendezVous ? JamiStrings.createNewRV : JamiStrings.createAccount enabled: checkEnable() color: checkEnable() ? JamiTheme.wizardBlueButtons : JamiTheme.buttonTintedGreyInactive diff --git a/src/app/wizardview/components/WelcomePage.qml b/src/app/wizardview/components/WelcomePage.qml index 180405c80..b599f31d5 100644 --- a/src/app/wizardview/components/WelcomePage.qml +++ b/src/app/wizardview/components/WelcomePage.qml @@ -125,7 +125,7 @@ Rectangle { preferredWidth: JamiTheme.wizardButtonWidth - text: JamiStrings.createRV + text: JamiStrings.createNewRV font.capitalization: Font.AllUppercase toolTipText: JamiStrings.createNewRV iconSource: JamiResources.groups_24dp_svg