Skip to content

Commit

Permalink
Improved the tab cose button position and size
Browse files Browse the repository at this point in the history
  • Loading branch information
Freaxed authored and jackburton79 committed Dec 20, 2023
1 parent 9a4f45e commit 1e7b945
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/helpers/tabview/TabManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -697,10 +697,7 @@ void WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
BRect closeRect = _CloseRectFrame(frame);
frame.right = closeRect.left - be_control_look->DefaultLabelSpacing();

closeRect.left = (closeRect.left + closeRect.right) / 2 - 3;
closeRect.right = closeRect.left + 6;
closeRect.top = (closeRect.top + closeRect.bottom) / 2 - 3;
closeRect.bottom = closeRect.top + 6;
closeRect.InsetBy(closeRect.Width() * 0.30f, closeRect.Height() * 0.30f);

rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
float tint = B_LIGHTEN_1_TINT;
Expand All @@ -726,6 +723,8 @@ void WebTabView::_DrawCloseButton(BView* owner, BRect& frame,
base = tint_color(base, tint);
owner->SetHighColor(base);
owner->SetPenSize(2);
closeRect.left +=1.0f;
closeRect.top +=1.0f;
owner->StrokeLine(closeRect.LeftTop(), closeRect.RightBottom());
owner->StrokeLine(closeRect.LeftBottom(), closeRect.RightTop());
owner->SetPenSize(1);
Expand Down

0 comments on commit 1e7b945

Please sign in to comment.