diff options
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.patch | 38 |
1 files changed, 13 insertions, 25 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 2fed6e9..7937d6f 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,29 +1,17 @@ | |||
| 1 | --- a/chrome/browser/ui/views/tabs/tab.cc | 1 | --- chrome/browser/ui/views/tabs/tab_strip.cc.orig |
| 2 | +++ b/chrome/browser/ui/views/tabs/tab.cc | 2 | +++ chrome/browser/ui/views/tabs/tab_strip.cc |
| 3 | @@ -991,7 +991,11 @@ void Tab::UpdateIconVisibility() { | 3 | @@ -1909,6 +1909,8 @@ bool TabStrip::SupportsMultipleSelection |
| 4 | if (IsActive()) { | 4 | } |
| 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 | + } | ||
| 12 | 5 | ||
| 13 | showing_alert_indicator_ = | 6 | bool TabStrip::ShouldHideCloseButtonForTab(Tab* tab) const { |
| 14 | has_alert_icon && alert_icon_width <= available_width; | 7 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) |
| 15 | @@ -1012,6 +1016,8 @@ void Tab::UpdateIconVisibility() { | 8 | + return true; |
| 16 | available_width -= favicon_width; | 9 | if (tab->IsActive()) |
| 17 | 10 | return false; | |
| 18 | showing_close_button_ = large_enough_for_close_button; | 11 | return !!touch_layout_; |
| 19 | + if (base::CommandLine::ForCurrentProcess()->HasSwitch("hide-tab-close-buttons")) | 12 | --- chrome/browser/ungoogled_flag_entries.h.orig |
| 20 | + showing_close_button_ = false; | 13 | +++ chrome/browser/ungoogled_flag_entries.h |
| 21 | if (showing_close_button_) | 14 | @@ -92,4 +92,8 @@ |
| 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 @@ | ||
| 27 | "Tab Hover Cards", | 15 | "Tab Hover Cards", |
| 28 | "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.", | 16 | "Allows removing the tab hover cards or using a tooltip as a replacement. ungoogled-chromium flag.", |
| 29 | kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)}, | 17 | kOsDesktop, MULTI_VALUE_TYPE(kTabHoverCards)}, |
