Skip to content

Truly independent web browser

UI/Qt: Don't render the tab close corner button while hover-expanding

Timothy Flynn337956fe6b23
diff --git a/UI/Qt/TabBar.cpp b/UI/Qt/TabBar.cpp
index 43fb40bc8a9..6370d12ee27 100644
--- a/UI/Qt/TabBar.cpp
+++ b/UI/Qt/TabBar.cpp
@@ -1742,7 +1742,8 @@ void TabBar::update_tab_button_geometry()
return;
prepare_button(button, true);
- auto should_be_visible = index != dragged_index && (position == QTabBar::LeftSide || index == m_hovered_tab_index);
+ auto should_be_visible = index != dragged_index
+ && (position == QTabBar::LeftSide || (index == m_hovered_tab_index && !m_tab_widget->can_expand_vertical_tabs_on_hover()));
bool did_update_button = false;
if (button->isVisible() != should_be_visible) {
button->setVisible(should_be_visible);
diff --git a/UI/Qt/TabBar.h b/UI/Qt/TabBar.h
index 8729fed1f83..ef5cd1492e5 100644
--- a/UI/Qt/TabBar.h
+++ b/UI/Qt/TabBar.h
@@ -212,6 +212,7 @@ public:
void set_vertical_tabs_expanded(bool);
void set_vertical_tabs_expand_on_hover(bool);
void set_vertical_tabs_position(WebView::VerticalTabsPosition);
+ bool can_expand_vertical_tabs_on_hover() const;
void update_tab_button_visibility();
signals:
@@ -231,7 +232,6 @@ private:
TabLayout current_tab_layout() const;
QWidget* tab_drag_area_widget() const;
bool vertical_tabs_effectively_expanded() const;
- bool can_expand_vertical_tabs_on_hover() const;
bool cursor_is_over_vertical_tabs() const;
bool vertical_tabs_are_on_right() const;
int vertical_tabs_layout_width() const;