From 511401665fa83f11efcfdfd7988c628488734f8b Mon Sep 17 00:00:00 2001 From: John Lewin Date: Mon, 25 Dec 2017 08:34:57 -0800 Subject: [PATCH 1/5] Rename button --- .../LibrarySelector/FolderBreadCrumbWidget.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs index 00d6bd368..3c17e38ca 100644 --- a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs +++ b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs @@ -112,15 +112,15 @@ namespace MatterHackers.MatterControl.CustomWidgets }); } - 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) => + 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; } From 04bb036120e93d1ae672abb0668c6166b64930a0 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Mon, 25 Dec 2017 08:35:46 -0800 Subject: [PATCH 2/5] Guard for null - Issue MatterHackers/MCCentral#2499 Repair expected CloudLibrary behavior --- Library/Widgets/ListView/ListView.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) 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); } From 91d8b746ae2da69a695dcb657a6474f55291eca2 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Mon, 25 Dec 2017 09:13:56 -0800 Subject: [PATCH 3/5] Switch to forward slash separator - Issue MatterHackers/MCCentral#2500 Use forward slash as content separator instead of right arrow --- .../LibrarySelector/FolderBreadCrumbWidget.cs | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs index 3c17e38ca..08c5e0a99 100644 --- a/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs +++ b/CustomWidgets/LibrarySelector/FolderBreadCrumbWidget.cs @@ -105,13 +105,10 @@ 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); } + // Create a button for each container Button containerButton = linkButtonFactory.Generate(container.Name); containerButton.Name = "Bread Crumb Button " + container.Name; containerButton.VAnchor = VAnchor.Center; @@ -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 From 269e43fafecdf57ac62e5e34b78aa12decd16415 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Mon, 25 Dec 2017 09:52:50 -0800 Subject: [PATCH 4/5] Revise SaveAs dialog colors - Remove redundant selectorPanel widget - Issue MatterHackers/MCCentral#2501 Too much contrast --- PartPreviewWindow/LibraryBrowserPage.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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"; From 623ff513f6590fe587b55d64bb9479e1c25b9af5 Mon Sep 17 00:00:00 2001 From: John Lewin Date: Mon, 25 Dec 2017 09:58:44 -0800 Subject: [PATCH 5/5] Fix incorrect IsReadOnly indicator - Issue MatterHackers/MCCentral#2502 Zip files/containers should not appear as Save locations --- Library/Providers/Zip/LocalZipContainerLink.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; }