summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch')
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch38
1 files changed, 25 insertions, 13 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
index 7937d6f..2fed6e9 100644
--- a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
+++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-hide-tab-close-buttons.patch
@@ -1,17 +1,29 @@
1--- chrome/browser/ui/views/tabs/tab_strip.cc.orig 1--- a/chrome/browser/ui/views/tabs/tab.cc
2+++ chrome/browser/ui/views/tabs/tab_strip.cc 2+++ b/chrome/browser/ui/views/tabs/tab.cc
3@@ -1909,6 +1909,8 @@ bool TabStrip::SupportsMultipleSelection 3@@ -991,7 +991,11 @@ void Tab::UpdateIconVisibility() {
4 } 4 if (IsActive()) {
5 // Close button is shown on active tabs regardless of the size.
6 showing_close_button_ = true;
7+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) {
8+ showing_close_button_ = false;
9+ } else {
10 available_width -= close_button_width;
11+ }
5 12
6 bool TabStrip::ShouldHideCloseButtonForTab(Tab* tab) const { 13 showing_alert_indicator_ =
7+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) 14 has_alert_icon && alert_icon_width <= available_width;
8+ return true; 15@@ -1012,6 +1016,8 @@ void Tab::UpdateIconVisibility() {
9 if (tab->IsActive()) 16 available_width -= favicon_width;
10 return false; 17
11 return !!touch_layout_; 18 showing_close_button_ = large_enough_for_close_button;
12--- chrome/browser/ungoogled_flag_entries.h.orig 19+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons"))
13+++ chrome/browser/ungoogled_flag_entries.h 20+ showing_close_button_ = false;
14@@ -92,4 +92,8 @@ 21 if (showing_close_button_)
22 available_width -= close_button_width;
23
24--- a/chrome/browser/ungoogled_flag_entries.h
25+++ b/chrome/browser/ungoogled_flag_entries.h
26@@ -84,4 +84,8 @@
15 "Tab Hover Cards", 27 "Tab Hover Cards",
16 "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.", 28 "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.",
17 kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)}, 29 kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)},