From 38e5d0967a7a4e0ce34e43dc45ff0678f3c561f9 Mon Sep 17 00:00:00 2001 From: cberthet <capucine.berthet@savoirfairelinux.com> Date: Tue, 7 Nov 2023 11:17:38 -0500 Subject: [PATCH] JamiIdentifier: change icons GitLab: #1417 Change-Id: I30e32098a53941cdb393a472764c47a333a87449 --- resources/icons/assignment_ind_black_24dp.svg | 4 +++ resources/icons/content_copy_24dp.svg | 13 +++----- resources/icons/share_24dp.svg | 29 ++++++++++------ src/app/commoncomponents/JamiIdentifier.qml | 33 +++++++++++++------ src/app/constant/JamiTheme.qml | 9 ++--- 5 files changed, 55 insertions(+), 33 deletions(-) create mode 100644 resources/icons/assignment_ind_black_24dp.svg diff --git a/resources/icons/assignment_ind_black_24dp.svg b/resources/icons/assignment_ind_black_24dp.svg new file mode 100644 index 000000000..5e39e81e2 --- /dev/null +++ b/resources/icons/assignment_ind_black_24dp.svg @@ -0,0 +1,4 @@ +<svg id="assignment_ind_black_24dp" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="Path_311" data-name="Path 311" d="M0,0H24V24H0Z" fill="none"/> + <path id="Path_312" data-name="Path 312" d="M19,3H14.82A2.988,2.988,0,0,0,9.18,3H5A2.006,2.006,0,0,0,3,5V19a2.006,2.006,0,0,0,2,2H19a2.006,2.006,0,0,0,2-2V5A2.006,2.006,0,0,0,19,3Zm-7-.25a.767.767,0,1,1-.55.25A.749.749,0,0,1,12,2.75ZM19,19H5V5H19ZM12,6a3,3,0,1,0,3,3A3.009,3.009,0,0,0,12,6Zm0,4a1,1,0,1,1,1-1A1,1,0,0,1,12,10ZM6,16.47V18H18V16.47c0-2.5-3.97-3.58-6-3.58S6,13.96,6,16.47ZM8.31,16A7.011,7.011,0,0,1,12,14.88,6.982,6.982,0,0,1,15.69,16Z" fill="#005699"/> +</svg> diff --git a/resources/icons/content_copy_24dp.svg b/resources/icons/content_copy_24dp.svg index d220c32c9..0f158c2de 100644 --- a/resources/icons/content_copy_24dp.svg +++ b/resources/icons/content_copy_24dp.svg @@ -1,9 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- Generator: Adobe Illustrator 24.3.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) --> -<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" - viewBox="0 0 24 24" style="enable-background:new 0 0 24 24;" xml:space="preserve"> -<path d="M20.4,2.2H8.5c-0.9,0-1.6,0.7-1.6,1.6v2.9H3.6C2.7,6.7,2,7.4,2,8.3v11.9c0,0.9,0.7,1.6,1.6,1.6h11.9c0.9,0,1.6-0.7,1.6-1.6 - v-2.9h3.3c0.9,0,1.6-0.7,1.6-1.6V3.8C22,2.9,21.3,2.2,20.4,2.2z M15.8,20.2c0,0.2-0.1,0.3-0.3,0.3H3.6c-0.2,0-0.3-0.1-0.3-0.3V8.3 - C3.3,8.2,3.4,8,3.6,8h11.9c0.2,0,0.3,0.1,0.3,0.3V20.2z M20.7,15.7c0,0.2-0.1,0.3-0.3,0.3h-3.3V8.3c0-0.9-0.7-1.6-1.6-1.6H8.2V3.8 - c0-0.2,0.1-0.3,0.3-0.3h11.9c0.2,0,0.3,0.1,0.3,0.3V15.7z"/> -</svg> \ No newline at end of file +<svg id="content_copy_24dp" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <path id="Path_305" data-name="Path 305" d="M0,0H24V24H0Z" fill="none"/> + <path id="Path_306" data-name="Path 306" d="M16,1H4A2.006,2.006,0,0,0,2,3V17H4V3H16Zm3,4H8A2.006,2.006,0,0,0,6,7V21a2.006,2.006,0,0,0,2,2H19a2.006,2.006,0,0,0,2-2V7A2.006,2.006,0,0,0,19,5Zm0,16H8V7H19Z" fill="#005699"/> +</svg> diff --git a/resources/icons/share_24dp.svg b/resources/icons/share_24dp.svg index 50173abf7..7c3f75d94 100644 --- a/resources/icons/share_24dp.svg +++ b/resources/icons/share_24dp.svg @@ -1,11 +1,20 @@ -<?xml version="1.0" encoding="UTF-8"?> -<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title>Share</title> - <g id="Icones" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"> - <g id="Share" fill="#000000" stroke="#000000" stroke-width="0.75"> - <g id="SHARE" transform="translate(4.000000, 2.000000)"> - <path d="M13.5,15.00005 C14.6105,15.00005 15.5,15.88955 15.5,17.00005 C15.5,18.1103 14.6105,19.00005 13.5,19.00005 C12.3895,19.00005 11.5,18.1103 11.5,17.00005 C11.5,15.88955 12.3895,15.00005 13.5,15.00005 M3,8.00005 C4.1105,8.00005 5,8.88955 5,10.00005 C5,11.11055 4.1105,12.00005 3,12.00005 C1.8895,12.00005 1,11.11055 1,10.00005 C1,8.88955 1.8895,8.00005 3,8.00005 M13.5,1.00005 C14.6105,1.00005 15.5,1.88955 15.5,3.00005 C15.5,4.11055 14.6105,5.00005 13.5,5.00005 C12.3895,5.00005 11.5,4.11055 11.5,3.00005 C11.5,1.88955 12.3895,1.00005 13.5,1.00005 M13.5,5e-05 C11.849,5e-05 10.5,1.34905 10.5,3.00005 C10.5,3.47555 10.6135,3.92755 10.8125,4.32805 L5.086,7.85155 C4.545,7.3263 3.8095,7.00005 3,7.00005 C1.349,7.00005 0,8.34905 0,10.00005 C0,11.65105 1.349,13.00005 3,13.00005 C3.81525,13.00005 4.552,12.67255 5.09375,12.14055 L10.82025,15.66405 C10.6165,16.0683 10.5,16.51805 10.5,17.00005 C10.5,18.65105 11.849,20.00005 13.5,20.00005 C15.151,20.00005 16.5,18.65105 16.5,17.00005 C16.5,15.34905 15.151,14.00005 13.5,14.00005 C12.6905,14.00005 11.955,14.3263 11.414,14.85155 L5.6875,11.32805 C5.8865,10.92755 6,10.47555 6,10.00005 C6,9.51805 5.8835,9.06855 5.67975,8.66405 L11.40625,5.14055 C11.94825,5.67255 12.68475,6.00005 13.5,6.00005 C15.151,6.00005 16.5,4.65105 16.5,3.00005 C16.5,1.34905 15.151,5e-05 13.5,5e-05" id="Fill-1"></path> - </g> - </g> +<svg id="share_24dp" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> + <g id="Group_66" data-name="Group 66"> + <rect id="Rectangle_305" data-name="Rectangle 305" width="24" height="24" fill="none"/> + </g> + <g id="Group_68" data-name="Group 68"> + <g id="Group_67" data-name="Group 67"> + <path id="Path_302" data-name="Path 302" d="M3,11h8V3H3ZM5,5H9V9H5Z" fill="#005699"/> + <path id="Path_303" data-name="Path 303" d="M3,21h8V13H3Zm2-6H9v4H5Z" fill="#005699"/> + <path id="Path_304" data-name="Path 304" d="M13,3v8h8V3Zm6,6H15V5h4Z" fill="#005699"/> + <rect id="Rectangle_306" data-name="Rectangle 306" width="2" height="2" transform="translate(19 19)" fill="#005699"/> + <rect id="Rectangle_307" data-name="Rectangle 307" width="2" height="2" transform="translate(13 13)" fill="#005699"/> + <rect id="Rectangle_308" data-name="Rectangle 308" width="2" height="2" transform="translate(15 15)" fill="#005699"/> + <rect id="Rectangle_309" data-name="Rectangle 309" width="2" height="2" transform="translate(13 17)" fill="#005699"/> + <rect id="Rectangle_310" data-name="Rectangle 310" width="2" height="2" transform="translate(15 19)" fill="#005699"/> + <rect id="Rectangle_311" data-name="Rectangle 311" width="2" height="2" transform="translate(17 17)" fill="#005699"/> + <rect id="Rectangle_312" data-name="Rectangle 312" width="2" height="2" transform="translate(17 13)" fill="#005699"/> + <rect id="Rectangle_313" data-name="Rectangle 313" width="2" height="2" transform="translate(19 15)" fill="#005699"/> </g> -</svg> \ No newline at end of file + </g> +</svg> diff --git a/src/app/commoncomponents/JamiIdentifier.qml b/src/app/commoncomponents/JamiIdentifier.qml index 6264651ca..2feec902a 100644 --- a/src/app/commoncomponents/JamiIdentifier.qml +++ b/src/app/commoncomponents/JamiIdentifier.qml @@ -52,7 +52,7 @@ Item { RoundedBorderRectangle { id: leftRect - fillColor: jamiId.backgroundColor + fillColor: JamiTheme.jamiIdBackgroundColor Layout.preferredWidth: childrenRect.width Layout.maximumWidth: jamiId.width - rightRect.width Layout.preferredHeight: childrenRect.height @@ -73,7 +73,7 @@ Item { containerWidth: 40 Layout.leftMargin: JamiTheme.pushButtonMargins source: JamiResources.jami_id_logo_svg - color: jamiId.contentColor + color: JamiTheme.tintedBlue } UsernameTextEdit { @@ -81,7 +81,7 @@ Item { visible: !readOnly Layout.preferredHeight: 40 Layout.alignment: Qt.AlignVCenter - textColor: jamiId.contentColor + textColor: JamiTheme.tintedBlue fontPixelSize: staticText.length > 16 || dynamicText.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.bigFontSize editMode: false isPersistent: false @@ -107,7 +107,7 @@ Item { Layout.rightMargin: JamiTheme.pushButtonMargins Layout.maximumWidth: leftRect.width - 50 elide: Text.ElideRight - color: jamiId.contentColor + color: JamiTheme.tintedBlue font.pixelSize : text.length > 16 ? JamiTheme.jamiIdSmallFontSize : JamiTheme.bigFontSize property string registeredName: CurrentAccount.registeredName property string infohash: CurrentAccount.uri @@ -118,7 +118,7 @@ Item { RoundedBorderRectangle { id: rightRect - fillColor: jamiId.backgroundColor + fillColor: JamiTheme.jamiIdBackgroundColor Layout.preferredWidth: childrenRect.width + 2 * JamiTheme.pushButtonMargins Layout.preferredHeight: leftRect.height @@ -142,8 +142,8 @@ Item { id: btnEdit anchors.leftMargin: JamiTheme.pushButtonMargins visible: CurrentAccount.registeredName === "" - border.color: enabled ? jamiId.contentColor : JamiTheme.buttonTintedBlack - imageColor: enabled ? jamiId.contentColor : JamiTheme.buttonTintedBlack + imageColor: enabled ? JamiTheme.tintedBlue : JamiTheme.buttonTintedBlack + border.color: usernameTextEdit.editMode ? jamiId.contentColor : "transparent" enabled: { if (!usernameTextEdit.editMode) return true; @@ -157,7 +157,7 @@ Item { return false; } } - source: usernameTextEdit.editMode ? JamiResources.check_black_24dp_svg : JamiResources.round_edit_24dp_svg + source: usernameTextEdit.editMode ? JamiResources.check_black_24dp_svg : JamiResources.assignment_ind_black_24dp_svg toolTipText: JamiStrings.chooseUsername onClicked: { if (usernameTextEdit.readOnly) { @@ -167,6 +167,19 @@ Item { usernameTextEdit.accepted(); } } + + Rectangle { + width: 10 + height: 10 + visible: !usernameTextEdit.editMode + + anchors.top: parent.top + anchors.right: parent.right + radius: width / 2 + color: JamiTheme.redDotColor + border.color: JamiTheme.jamiIdBackgroundColor + border.width: 2 + } } JamiIdControlButton { @@ -188,7 +201,7 @@ Item { JamiIdControlButton { id: btnId - source: JamiResources.key_black_24dp_svg + source: JamiResources.outline_info_24dp_svg visible: CurrentAccount.registeredName !== "" border.color: "transparent" toolTipText: JamiStrings.identifierURI @@ -217,7 +230,7 @@ Item { imageContainerWidth: JamiTheme.pushButtonSize imageContainerHeight: JamiTheme.pushButtonSize border.color: jamiId.contentColor - imageColor: jamiId.contentColor + imageColor: JamiTheme.tintedBlue duration: 0 } } diff --git a/src/app/constant/JamiTheme.qml b/src/app/constant/JamiTheme.qml index e644ccf2b..64163825c 100644 --- a/src/app/constant/JamiTheme.qml +++ b/src/app/constant/JamiTheme.qml @@ -436,10 +436,6 @@ Item { property real switchPreferredWidth: 40 property real switchIndicatorPreferredWidth: 20 - // Jami Identifier - property color mainColor: "#005699" - property real pushButtonSize: 22 - property real pushButtonMargins: 10 // Modal Popup property real modalPopupRadius: 20 @@ -508,6 +504,11 @@ Item { property real jamiIdFontSize: calcSize(19) property real jamiIdSmallFontSize: calcSize(11) property color jamiIdColor: darkTheme ? blackColor : sysColor + property color mainColor: "#005699" + property real pushButtonSize: 22 + property real pushButtonMargins: 10 + property color jamiIdBackgroundColor: darkTheme ? "#333333" : "#F0EFEF" + property color redDotColor: "#CC0022" // MainView property color rectColor: darkTheme ? blackColor : "#e5eef5" -- GitLab