From 5e94691ca348300752d5e4e6ae3d6d696d60f153 Mon Sep 17 00:00:00 2001 From: Taher Date: Tue, 26 Oct 2021 14:13:37 -0700 Subject: [PATCH] Updated tor icon and copy in location bar --- app/brave_generated_resources.grd | 6 ++ app/vector_icons/open_in_tor.icon | 60 +++++++++---------- .../views/location_bar/onion_location_view.cc | 7 ++- 3 files changed, 41 insertions(+), 32 deletions(-) diff --git a/app/brave_generated_resources.grd b/app/brave_generated_resources.grd index 72e45af9e8c9..655aca12799e 100644 --- a/app/brave_generated_resources.grd +++ b/app/brave_generated_resources.grd @@ -388,6 +388,9 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U Open Private Window with Tor + Tor + + Open in Tor @@ -399,6 +402,9 @@ By installing this extension, you are agreeing to the Google Widevine Terms of U Onion Available + + Open using .onion address + Import to IPFS diff --git a/app/vector_icons/open_in_tor.icon b/app/vector_icons/open_in_tor.icon index 0c358687e4e3..881a1b94d752 100644 --- a/app/vector_icons/open_in_tor.icon +++ b/app/vector_icons/open_in_tor.icon @@ -3,36 +3,34 @@ // You can obtain one at http://mozilla.org/MPL/2.0/. CANVAS_DIMENSIONS, 12, -MOVE_TO, 11.5f, 10, -R_CUBIC_TO, -0.28f, 0, -0.5f, -0.22f, -0.5f, -0.5f, -V_LINE_TO, 1, -H_LINE_TO, 2.5f, -CUBIC_TO, 2.22f, 1, 2, 0.78f, 2, 0.5f, -R_CUBIC_TO, 0, -0.28f, 0.22f, -0.5f, 0.5f, -0.5f, -H_LINE_TO, 11, -R_CUBIC_TO, 0.55f, 0, 1, 0.45f, 1, 1, -R_V_LINE_TO, 8.5f, -R_CUBIC_TO, 0, 0.28f, -0.22f, 0.5f, -0.5f, 0.5f, +MOVE_TO, 6.07f, 1.96f, +H_LINE_TO, 1.01f, +R_V_LINE_TO, 9.08f, +R_H_LINE_TO, 9.1f, +V_LINE_TO, 6, +R_CUBIC_TO, 0, -0.28f, 0.1f, -0.49f, 0.38f, -0.49f, +R_ARC_TO, 0.5f, 0.5f, 0, 0, 1, 0.5f, 0.5f, +V_LINE_TO, 11.5f, +R_ARC_TO, 0.5f, 0.5f, 0, 0, 1, -0.5f, 0.5f, +H_LINE_TO, 0.47f, +CUBIC_TO, 0.19f, 12, 0, 11.82f, 0, 11.54f, +V_LINE_TO, 1.46f, +R_CUBIC_TO, 0, -0.28f, 0.19f, -0.44f, 0.47f, -0.44f, +R_H_LINE_TO, 5.51f, +R_ARC_TO, 0.5f, 0.5f, 0, 0, 1, 0.5f, 0.5f, +R_CUBIC_TO, 0, 0.28f, -0.14f, 0.45f, -0.41f, 0.45f, CLOSE, -MOVE_TO, 10, 3, -R_V_LINE_TO, 8, -R_CUBIC_TO, 0, 0.55f, -0.45f, 1, -1, 1, -H_LINE_TO, 1, -R_CUBIC_TO, -0.55f, 0, -1, -0.45f, -1, -1, -V_LINE_TO, 3, -R_CUBIC_TO, 0, -0.55f, 0.45f, -1, 1, -1, -R_H_LINE_TO, 8, -R_CUBIC_TO, 0.55f, 0, 1, 0.45f, 1, 1, -CLOSE, -R_MOVE_TO, -9, 8, -R_H_LINE_TO, 8, -R_LINE_TO, 0, -6, -H_LINE_TO, 1, -R_V_LINE_TO, 6, -CLOSE, -R_MOVE_TO, 0, -7, -R_H_LINE_TO, 8, -V_LINE_TO, 3, -H_LINE_TO, 1, -R_V_LINE_TO, 1, +MOVE_TO, 6.5f, 5, +R_CUBIC_TO, 0, -0.13f, 0.05f, -0.26f, 0.15f, -0.35f, +LINE_TO, 10.3f, 0.99f, +LINE_TO, 7.5f, 1, +R_ARC_TO, 0.5f, 0.5f, 0, 0, 1, 0, -1, +R_H_LINE_TO, 4, +ARC_TO, 0.5f, 0.5f, 0, 0, 1, 12, 0.5f, +R_V_LINE_TO, 4, +R_ARC_TO, 0.5f, 0.5f, 0, 0, 1, -0.5f, 0.5f, +R_CUBIC_TO, -0.28f, 0, -0.47f, -0.21f, -0.47f, -0.49f, +R_V_LINE_TO, -2.84f, +R_LINE_TO, -3.68f, 3.68f, +ARC_TO, 0.5f, 0.5f, 0, 0, 1, 6.5f, 5, CLOSE diff --git a/browser/ui/views/location_bar/onion_location_view.cc b/browser/ui/views/location_bar/onion_location_view.cc index 795cdf6d2fa4..5101766e70de 100644 --- a/browser/ui/views/location_bar/onion_location_view.cc +++ b/browser/ui/views/location_bar/onion_location_view.cc @@ -83,8 +83,13 @@ class OnionLocationButtonView : public views::LabelButton { base::Unretained(this)), l10n_util::GetStringUTF16(IDS_LOCATION_BAR_OPEN_IN_TOR)), profile_(profile) { - if (profile->IsTor()) + SetTooltipText( + l10n_util::GetStringUTF16(IDS_LOCATION_BAR_OPEN_IN_TOR_TOOLTIP_TEXT)); + if (profile->IsTor()) { SetText(l10n_util::GetStringUTF16(IDS_LOCATION_BAR_ONION_AVAILABLE)); + SetTooltipText(l10n_util::GetStringUTF16( + IDS_LOCATION_BAR_ONION_AVAILABLE_TOOLTIP_TEXT)); + } // Render vector icon const gfx::ImageSkia image = gfx::CreateVectorIcon(kOpenInTorIcon, kIconSize, kIconColor);