Browse Source

New visual patches

Blaise 4 years ago
parent
commit
65d6f06fbd

+ 13 - 0
tweaks/visual/hover-status-full-url.patch

@@ -0,0 +1,13 @@
+## Always show the full URL in the status bubble when hovering links
+
+--- a/chrome/browser/ui/status_bubble.h
++++ b/chrome/browser/ui/status_bubble.h
+@@ -18,7 +18,7 @@ class GURL;
+ class StatusBubble {
+  public:
+   // On hover, expand status bubble to fit long URL after this delay.
+-  static const int kExpandHoverDelayMS = 1600;
++  static const int kExpandHoverDelayMS = 0;
+ 
+   virtual ~StatusBubble() {}
+ 

+ 33 - 0
tweaks/visual/remove-focusring-from-locationbar.patch

@@ -0,0 +1,33 @@
+## This patch removes the focus ring from the location bar.
+#
+# Alternatively the color could be changed with focus_ring_->SetColor(SkColor).
+
+--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
++++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
+@@ -152,26 +152,6 @@ LocationBarView::LocationBarView(Browser
+       profile_(profile),
+       delegate_(delegate),
+       is_popup_mode_(is_popup_mode) {
+-  if (!is_popup_mode_) {
+-    focus_ring_ = views::FocusRing::Install(this);
+-    focus_ring_->SetHasFocusPredicate([](View* view) -> bool {
+-      DCHECK(views::IsViewClass<LocationBarView>(view));
+-      auto* v = static_cast<LocationBarView*>(view);
+-
+-      // Show focus ring when the Omnibox is visibly focused and the popup is
+-      // closed.
+-      return v->omnibox_view_->model()->is_caret_visible() &&
+-             !v->GetOmniboxPopupView()->IsOpen();
+-    });
+-
+-    focus_ring_->SetPathGenerator(
+-        std::make_unique<views::PillHighlightPathGenerator>());
+-
+-#if defined(OS_MAC)
+-    geolocation_permission_observation_.Observe(
+-        g_browser_process->platform_part()->location_permission_manager());
+-#endif
+-  }
+ }
+ 
+ LocationBarView::~LocationBarView() = default;

+ 24 - 0
tweaks/visual/remove-tab-search-button.patch

@@ -0,0 +1,24 @@
+## This patch removes the tab search button from the tab strip.
+
+--- a/chrome/browser/ui/views/frame/tab_strip_region_view.cc
++++ b/chrome/browser/ui/views/frame/tab_strip_region_view.cc
+@@ -258,19 +258,6 @@ TabStripRegionView::TabStripRegionView(s
+   tip_marquee_view_->SetProperty(views::kCrossAxisAlignmentKey,
+                                  views::LayoutAlignment::kCenter);
+   tip_marquee_view_->SetProperty(views::kMarginsKey, control_padding);
+-
+-  const Browser* browser = tab_strip_->controller()->GetBrowser();
+-  if (browser && browser->is_type_normal()) {
+-    auto tab_search_button = std::make_unique<TabSearchButton>(tab_strip_);
+-    tab_search_button->SetTooltipText(
+-        l10n_util::GetStringUTF16(IDS_TOOLTIP_TAB_SEARCH));
+-    tab_search_button->SetAccessibleName(
+-        l10n_util::GetStringUTF16(IDS_ACCNAME_TAB_SEARCH));
+-    tab_search_button->SetProperty(views::kCrossAxisAlignmentKey,
+-                                   views::LayoutAlignment::kCenter);
+-    tab_search_button_ = AddChildView(std::move(tab_search_button));
+-    tab_search_button_->SetProperty(views::kMarginsKey, control_padding);
+-  }
+ }
+ 
+ TabStripRegionView::~TabStripRegionView() = default;