making library toolbar consistent

This commit is contained in:
LarsBrubaker 2020-08-08 07:13:18 -07:00
parent f3cd5f7215
commit 3af66f1aa3
2 changed files with 11 additions and 12 deletions

View file

@ -95,7 +95,6 @@ namespace MatterHackers.MatterControl.PrintLibrary
HAnchor = HAnchor.Stretch,
VAnchor = VAnchor.Fit,
};
allControls.AddChild(navBar);
theme.ApplyBottomBorder(navBar);
breadCrumbWidget = new FolderBreadCrumbWidget(libraryContext, theme);
@ -145,10 +144,12 @@ namespace MatterHackers.MatterControl.PrintLibrary
};
navBar.AddChild(searchButton);
navBar.AddChild(CreateViewMenuButton(theme, libraryView, (show) => ShowContainers = show, () => ShowContainers));
navBar.AddChild(CreateViewOptionsMenuButton(theme, libraryView, (show) => ShowContainers = show, () => ShowContainers));
navBar.AddChild(CreateSortingMenuButton(theme, libraryView));
allControls.AddChild(navBar);
var horizontalSplitter = new Splitter()
{
SplitterDistance = UserSettings.Instance.LibraryViewWidth,
@ -234,14 +235,11 @@ namespace MatterHackers.MatterControl.PrintLibrary
public static GuiWidget CreateSortingMenuButton(ThemeConfig theme, LibraryListView libraryView)
{
var viewOptionsButton = new PopupMenuButton(
new ImageWidget(AggContext.StaticData.LoadIcon("fa-sort_16.png", 32, 32, theme.InvertIcons))
{
// VAnchor = VAnchor.Center
},
theme)
new ImageWidget(AggContext.StaticData.LoadIcon("fa-sort_16.png", 32, 32, theme.InvertIcons)), theme)
{
AlignToRightEdge = true,
Name = "Print Library View Options"
Name = "Print Library View Options",
ToolTipText = "Sorting".Localize()
};
viewOptionsButton.DynamicPopupContent = () =>
@ -300,7 +298,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
return popupMenu;
}
public static GuiWidget CreateViewMenuButton(ThemeConfig theme,
public static GuiWidget CreateViewOptionsMenuButton(ThemeConfig theme,
LibraryListView libraryView,
Action<bool> showContainers,
Func<bool> containersShown)
@ -312,7 +310,8 @@ namespace MatterHackers.MatterControl.PrintLibrary
},
theme)
{
AlignToRightEdge = true
AlignToRightEdge = true,
ToolTipText = "View Settings".Localize()
};
viewMenuButton.DynamicPopupContent = () =>

View file

@ -99,7 +99,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
Name = "Folders Toolbar",
};
toolbar.OverflowButton.ToolTipText = "Sorting";
toolbar.OverflowButton.ToolTipText = "Sorting".Localize();
theme.ApplyBottomBorder(toolbar, shadedBorder: true);
@ -112,7 +112,7 @@ namespace MatterHackers.MatterControl.PrintLibrary
toolbar.AddChild(new HorizontalSpacer());
toolbar.AddChild(LibraryWidget.CreateViewMenuButton(theme,
toolbar.AddChild(LibraryWidget.CreateViewOptionsMenuButton(theme,
libraryView,
(show) => ShowContainers = show,
() => ShowContainers));