Files
brave-core/patches/chrome-browser-ui-views-tabs-tab.cc.patch
T

30 lines
1.6 KiB
Diff

diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index 7ae8a743d13d732fdfb944bea2e9ce0a54491e69..628b1746bde94d3cccb4fe99d25b2c1c32fbb4bd 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -404,6 +404,7 @@ void Tab::Layout(PassKey) {
// indicator, but visually it will be smaller at kFaviconSize wide.
gfx::Rect favicon_bounds(start, contents_rect.y(), 0, 0);
if (showing_icon_) {
+ BRAVE_UI_VIEWS_TABS_TAB_LAYOUT_ADJUST_ICON_POSITION
if (center_icon_) {
// When centering the favicon, the favicon is allowed to escape the normal
// contents rect.
@@ -504,6 +505,7 @@ void Tab::Layout(PassKey) {
int title_right = contents_rect.right();
if (showing_alert_indicator_) {
title_right = alert_indicator_button_->x() - after_title_padding;
+ BRAVE_UI_VIEWS_TABS_TAB_ALERT_INDICATOR_POSITION
} else if (showing_close_button_) {
// Allow the title to overlay the close button's empty border padding.
title_right = close_x - after_title_padding;
@@ -651,7 +653,7 @@ void Tab::OnMouseReleased(const ui::MouseEvent& event) {
// Close tab on middle click, but only if the button is released over the tab
// (normal windows behavior is to discard presses of a UI element where the
// releases happen off the element).
- if (event.IsOnlyMiddleMouseButton()) {
+ if (event.IsOnlyMiddleMouseButton() && controller_->CanCloseTabViaMiddleButtonClick()) {
if (HitTestPoint(event.location())) {
controller_->CloseTab(this, CloseTabSource::kFromMouse);
} else if (closing_) {