WebPositive: Remove obsolete code for hiding tab close buttons

No longer needed after hrev59533

Change-Id: Iefcc9d1a4d1481a42a9abfb8174f886ff7735a0b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/10616
Haiku-Format: Haiku-format Bot <[email protected]>
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: nephele nephele <[email protected]>
This commit is contained in:
nipos
2026-04-05 08:58:48 +00:00
committed by nephele nephele
parent 00b9933841
commit e6806c471d
3 changed files with 3 additions and 29 deletions
-1
View File
@@ -1886,7 +1886,6 @@ BrowserWindow::_UpdateTabGroupVisibility()
if (Lock()) { if (Lock()) {
if (fInterfaceVisible) if (fInterfaceVisible)
fTabGroup->SetVisible(_TabGroupShouldBeVisible()); fTabGroup->SetVisible(_TabGroupShouldBeVisible());
fTabManager->SetCloseButtonsAvailable(true);
Unlock(); Unlock();
} }
} }
+3 -27
View File
@@ -398,16 +398,6 @@ public:
void CloseTab(int32 index); void CloseTab(int32 index);
void SetCloseButtonsAvailable(bool available)
{
fCloseButtonsAvailable = available;
}
bool CloseButtonsAvailable() const
{
return fCloseButtonsAvailable;
}
void SetDoubleClickOutsideTabsMessage(const BMessage& message, void SetDoubleClickOutsideTabsMessage(const BMessage& message,
const BMessenger& target); const BMessenger& target);
@@ -419,7 +409,6 @@ public:
private: private:
TabManager* fManager; TabManager* fManager;
TabContainerGroup* fTabContainerGroup; TabContainerGroup* fTabContainerGroup;
bool fCloseButtonsAvailable;
BMessage* fDoubleClickOutsideTabsMessage; BMessage* fDoubleClickOutsideTabsMessage;
BMessenger fTarget; BMessenger fTarget;
BString fCurrentToolTip; BString fCurrentToolTip;
@@ -496,8 +485,7 @@ WebTabView::MaxSize()
void void
WebTabView::DrawContents(BView* owner, BRect frame, const BRect& updateRect) WebTabView::DrawContents(BView* owner, BRect frame, const BRect& updateRect)
{ {
if (fController->CloseButtonsAvailable()) _DrawCloseButton(owner, frame, updateRect);
_DrawCloseButton(owner, frame, updateRect);
if (fIcon != NULL) { if (fIcon != NULL) {
BRect iconBounds(0, 0, kIconSize - 1, kIconSize - 1); BRect iconBounds(0, 0, kIconSize - 1, kIconSize - 1);
@@ -545,7 +533,7 @@ WebTabView::MouseDown(BPoint where, uint32 buttons)
} }
BRect closeRect = _CloseRectFrame(Frame()); BRect closeRect = _CloseRectFrame(Frame());
if (!fController->CloseButtonsAvailable() || !closeRect.Contains(where)) { if (!closeRect.Contains(where)) {
TabView::MouseDown(where, buttons); TabView::MouseDown(where, buttons);
return; return;
} }
@@ -577,8 +565,7 @@ WebTabView::MouseMoved(BPoint where, uint32 transit,
BRect closeRect = _CloseRectFrame(Frame()); BRect closeRect = _CloseRectFrame(Frame());
bool overCloseRect = closeRect.Contains(where); bool overCloseRect = closeRect.Contains(where);
if (overCloseRect != fOverCloseRect if (overCloseRect != fOverCloseRect) {
&& fController->CloseButtonsAvailable()) {
fOverCloseRect = overCloseRect; fOverCloseRect = overCloseRect;
ContainerView()->Invalidate(closeRect); ContainerView()->Invalidate(closeRect);
} }
@@ -683,7 +670,6 @@ TabManagerController::TabManagerController(TabManager* manager)
: :
fManager(manager), fManager(manager),
fTabContainerGroup(NULL), fTabContainerGroup(NULL),
fCloseButtonsAvailable(false),
fDoubleClickOutsideTabsMessage(NULL) fDoubleClickOutsideTabsMessage(NULL)
{ {
} }
@@ -942,13 +928,3 @@ TabManager::SetTabIcon(const BView* containedView, const BBitmap* icon)
if (tab) if (tab)
tab->SetIcon(icon); tab->SetIcon(icon);
} }
void
TabManager::SetCloseButtonsAvailable(bool available)
{
if (available == fController->CloseButtonsAvailable())
return;
fController->SetCloseButtonsAvailable(available);
fTabContainerView->Invalidate();
}
@@ -61,7 +61,6 @@ public:
const BString& TabLabel(int32); const BString& TabLabel(int32);
void SetTabIcon(const BView* containedView, void SetTabIcon(const BView* containedView,
const BBitmap* icon); const BBitmap* icon);
void SetCloseButtonsAvailable(bool available);
private: private:
#if INTEGRATE_MENU_INTO_TAB_BAR #if INTEGRATE_MENU_INTO_TAB_BAR