Merge pull request #2804 from jlewin/design_tools

Revise SaveAs dialog colors
This commit is contained in:
johnlewin 2017-12-25 10:14:47 -08:00 committed by GitHub
commit 871892f9ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 32 deletions

View file

@ -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)
});
}
}
}

View file

@ -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; }

View file

@ -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);
}

View file

@ -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";