Skip to content

Commit

Permalink
Fixed new tab button's plus icon is mis-aligned with horizontal tab
Browse files Browse the repository at this point in the history
  • Loading branch information
simonhong committed Jan 16, 2024
1 parent 9ebff0d commit 4d0f154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions browser/ui/views/tabs/brave_new_tab_button.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4d0f154

Please sign in to comment.