From 4930e13e460b71f6dee02849d4a27329a52c3f8a Mon Sep 17 00:00:00 2001 From: brave-builds Date: Thu, 18 Jan 2024 14:20:04 +0000 Subject: [PATCH] Uplift of #21584 (squashed) to beta --- browser/ui/views/tabs/brave_new_tab_button.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/browser/ui/views/tabs/brave_new_tab_button.cc b/browser/ui/views/tabs/brave_new_tab_button.cc index 34dfe4f2603e..e476cbe488a6 100644 --- a/browser/ui/views/tabs/brave_new_tab_button.cc +++ b/browser/ui/views/tabs/brave_new_tab_button.cc @@ -85,8 +85,9 @@ void BraveNewTabButton::PaintIcon(gfx::Canvas* canvas) { // the canvas in the center of the view. constexpr int kIconSize = 18; gfx::Rect bounds = GetContentsBounds(); - canvas->Translate(gfx::Vector2d((bounds.width() - kIconSize) / 2, - (bounds.height() - kIconSize) / 2)); + canvas->Translate( + gfx::Vector2d((bounds.width() - kIconSize) / 2 + bounds.x(), + (bounds.height() - kIconSize) / 2 + bounds.y())); gfx::PaintVectorIcon(canvas, kLeoPlusAddIcon, kIconSize, GetForegroundColor()); return;