mirror of
https://github.com/imputnet/helium.git
synced 2026-08-20 00:57:32 +02:00
helium/ui/layout: disable mute on collapsed vertical tabs (#1778)
fixes #973 Co-authored-by: wukko <me@wukko.me>
This commit is contained in:
@@ -691,6 +691,28 @@
|
||||
}
|
||||
|
||||
if (child_view == close_button_) {
|
||||
@@ -828,6 +830,12 @@ bool VerticalTabView::GetHitTestMask(SkP
|
||||
}
|
||||
|
||||
bool VerticalTabView::ShouldEnableMuteToggle(int required_width) {
|
||||
+ // The mute toggle interferes with the click target of the
|
||||
+ // collapsed tab, so we disable click-to-mute for it.
|
||||
+ if (collapsed_) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
if (active_) {
|
||||
return true;
|
||||
}
|
||||
@@ -952,6 +960,8 @@ void VerticalTabView::OnAXNameChanged(ax
|
||||
void VerticalTabView::OnCollapseStateChanged(
|
||||
tabs::VerticalTabStripCollapseState state) {
|
||||
collapsed_ = state == tabs::VerticalTabStripCollapseState::kCollapsed;
|
||||
+ alert_indicator_->UpdateEnabledForMuteToggle();
|
||||
+ InvalidateLayout();
|
||||
}
|
||||
|
||||
void VerticalTabView::OnDataChanged() {
|
||||
--- a/chrome/browser/ui/tabs/vertical_tab_strip_state.h
|
||||
+++ b/chrome/browser/ui/tabs/vertical_tab_strip_state.h
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
Reference in New Issue
Block a user