diff options
author | iain holmes <iain@xamarin.com> | 2016-09-20 19:55:40 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2016-10-28 17:33:04 +0300 |
commit | bc903b778a18f80bafe8aea70d9da3d5d920a7a7 (patch) | |
tree | 7eb516874b7fd0b883387e425ac7efcc4d5ab818 /main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook | |
parent | bc31937f4bdcfee1328b0fe1101b676c284f0475 (diff) |
[A11y] Navigation buttons on tabstrip won't hide
The tabstrip navigation buttons wouldn't hide because the tabstrip was being shown with ShowAll.
Fix this by marking the navigation buttons as NoShowAll
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook')
-rw-r--r-- | main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs index fba6caa165..db73d76ccc 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/TabStrip.cs @@ -51,7 +51,6 @@ namespace MonoDevelop.Components.DockNotebook HBox innerBox; - List<Widget> children = new List<Widget> (); readonly DockNotebook notebook; DockNotebookTab highlightedTab; bool overCloseButton; @@ -111,21 +110,15 @@ namespace MonoDevelop.Components.DockNotebook } public bool NavigationButtonsVisible { - get { return children.Contains (PreviousButton); } + get { return NextButton.Visible; } set { if (value == NavigationButtonsVisible) return; - if (value) { - children.Add (NextButton); - children.Add (PreviousButton); - OnSizeAllocated (Allocation); - PreviousButton.ShowAll (); - NextButton.ShowAll (); - } else { - children.Remove (PreviousButton); - children.Remove (NextButton); - OnSizeAllocated (Allocation); - } + + NextButton.Visible = value; + PreviousButton.Visible = value; + + OnSizeAllocated (Allocation); } } @@ -204,7 +197,9 @@ namespace MonoDevelop.Components.DockNotebook DropDownButton.Accessible.Description = Core.GettextCatalog.GetString ("Display the document list menu"); PreviousButton.ShowAll (); + PreviousButton.NoShowAll = true; NextButton.ShowAll (); + NextButton.NoShowAll = true; DropDownButton.ShowAll (); PreviousButton.Name = "MonoDevelop.DockNotebook.BarButton"; @@ -215,10 +210,6 @@ namespace MonoDevelop.Components.DockNotebook innerBox.PackStart (NextButton, false, false, 0); innerBox.PackEnd (DropDownButton, false, false, 0); - children.Add (PreviousButton); - children.Add (NextButton); - children.Add (DropDownButton); - tracker.HoveredChanged += (sender, e) => { if (!tracker.Hovered) { SetHighlightedTab (null); |