diff --git a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs index 00d6bd368..08c5e0a99 100644 --- a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs +++ b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs @@ -105,22 +105,19 @@ namespace MatterHackers.MatterControl.CustomWidgets if (!firstItem) { // Add separator - this.AddChild(new TextWidget(">", textColor: ActiveTheme.Instance.PrimaryTextColor) - { - VAnchor = VAnchor.Center, - Margin = new BorderDouble(right: 5) - }); + this.CreateSeparator(theme); } - Button gotoProviderButton = linkButtonFactory.Generate(container.Name); - gotoProviderButton.Name = "Bread Crumb Button " + container.Name; - gotoProviderButton.VAnchor = VAnchor.Center; - gotoProviderButton.Margin = new BorderDouble(right: 5); - gotoProviderButton.Click += (s, e) => + // Create a button for each container + Button containerButton = linkButtonFactory.Generate(container.Name); + containerButton.Name = "Bread Crumb Button " + container.Name; + containerButton.VAnchor = VAnchor.Center; + containerButton.Margin = new BorderDouble(right: 5); + containerButton.Click += (s, e) => { UiThread.RunOnIdle(() => listView.SetActiveContainer(container)); }; - this.AddChild(gotoProviderButton); + this.AddChild(containerButton); firstItem = false; } @@ -128,11 +125,7 @@ namespace MatterHackers.MatterControl.CustomWidgets if (haveFilterRunning) { // Add separator ; - this.AddChild(new TextWidget(">", textColor: ActiveTheme.Instance.PrimaryTextColor) - { - VAnchor = VAnchor.Center, - Margin = new BorderDouble(right: 5) - }); + this.CreateSeparator(theme); Button searchResultsButton = null; if (UserSettings.Instance.IsTouchScreen) @@ -173,5 +166,14 @@ namespace MatterHackers.MatterControl.CustomWidgets } } } + + private void CreateSeparator(ThemeConfig theme) + { + this.AddChild(new TextWidget("/", pointSize: theme.FontSize11, textColor: ActiveTheme.Instance.PrimaryTextColor) + { + VAnchor = VAnchor.Center, + Margin = new BorderDouble(right: 5) + }); + } } } \ No newline at end of file diff --git a/Library/Providers/Zip/LocalZipContainerLink.cs b/Library/Providers/Zip/LocalZipContainerLink.cs index 06a527520..d99dd1f51 100644 --- a/Library/Providers/Zip/LocalZipContainerLink.cs +++ b/Library/Providers/Zip/LocalZipContainerLink.cs @@ -45,7 +45,7 @@ namespace MatterHackers.MatterControl.Library thumbnail = AggContext.StaticData.LoadIcon(System.IO.Path.Combine("FileDialog", "folder_zip.png")); } - public bool IsReadOnly { get; } = false; + public bool IsReadOnly { get; } = true; public Stream ZipStream { get; set; } diff --git a/Library/Widgets/ListView/ListView.cs b/Library/Widgets/ListView/ListView.cs index 6fc335d46..b21ed3661 100644 --- a/Library/Widgets/ListView/ListView.cs +++ b/Library/Widgets/ListView/ListView.cs @@ -354,14 +354,13 @@ namespace MatterHackers.MatterControl.CustomWidgets { // Container items var container = await containerLink.GetContainer(null); - - await Task.Run(() => - { - container.Load(); - }); - if (container != null) { + await Task.Run(() => + { + container.Load(); + }); + container.Parent = ActiveContainer; SetActiveContainer(container); } diff --git a/PartPreviewWindow/LibraryBrowserPage.cs b/PartPreviewWindow/LibraryBrowserPage.cs index 216e632ab..4a272a14c 100644 --- a/PartPreviewWindow/LibraryBrowserPage.cs +++ b/PartPreviewWindow/LibraryBrowserPage.cs @@ -28,6 +28,7 @@ either expressed or implied, of the FreeBSD Project. */ using System; +using MatterHackers.Agg; using MatterHackers.Agg.UI; using MatterHackers.MatterControl.CustomWidgets; using MatterHackers.MatterControl.Library; @@ -70,17 +71,11 @@ namespace MatterHackers.MatterControl // put in the bread crumb widget breadCrumbWidget = new FolderBreadCrumbWidget(librarySelectorWidget); + breadCrumbWidget.BackgroundColor = ActiveTheme.Instance.TertiaryBackgroundColor; contentRow.AddChild(breadCrumbWidget); + contentRow.BackgroundColor = Color.Transparent; - // put in the area to pick the provider to save to - var selectorPanel = new GuiWidget(10, 30) - { - HAnchor = HAnchor.Stretch, - VAnchor = VAnchor.Stretch, - BackgroundColor = ActiveTheme.Instance.PrimaryBackgroundColor, - }; - selectorPanel.AddChild(librarySelectorWidget); - contentRow.AddChild(selectorPanel); + contentRow.AddChild(librarySelectorWidget); acceptButton = buttonFactory.Generate(acceptButtonText); acceptButton.Name = "Accept Button";