diff --git a/Library/Export/FolderExport.cs b/Library/Export/FolderExport.cs index 4a7ae5faf..8cb4a0a5e 100644 --- a/Library/Export/FolderExport.cs +++ b/Library/Export/FolderExport.cs @@ -47,7 +47,7 @@ namespace MatterHackers.MatterControl.Library.Export public string ExtensionFilter => ""; - public ImageBuffer Icon { get; } = AggContext.StaticData.LoadIcon(Path.Combine("FileDialog", "folder.png"), 25, 25); + public ImageBuffer Icon { get; } = AggContext.StaticData.LoadIcon(Path.Combine("filetypes", "folder.png")); public void Initialize(PrinterConfig printer) { diff --git a/SetupWizard/DialogPage.cs b/SetupWizard/DialogPage.cs index f3cba11fd..deb16c7b4 100644 --- a/SetupWizard/DialogPage.cs +++ b/SetupWizard/DialogPage.cs @@ -36,7 +36,7 @@ using MatterHackers.VectorMath; namespace MatterHackers.MatterControl { - public class DialogPage : GuiWidget + public class DialogPage : FlowLayoutWidget { protected FlowLayoutWidget headerRow; protected FlowLayoutWidget contentRow; @@ -52,14 +52,16 @@ namespace MatterHackers.MatterControl protected double labelFontSize = 12 * GuiWidget.DeviceScale; protected double errorFontSize = 10 * GuiWidget.DeviceScale; - private GuiWidget mainContainer; - protected ThemeConfig theme; public DialogPage(string cancelButtonText = null) + : base (FlowDirection.TopToBottom) { theme = ApplicationController.Instance.Theme; + this.HAnchor = HAnchor.Stretch; + this.VAnchor = VAnchor.Stretch; + this.BackgroundColor = theme.Colors.PrimaryBackgroundColor; linkButtonFactory = theme.LinkButtonFactory; if (cancelButtonText == null) @@ -67,33 +69,20 @@ namespace MatterHackers.MatterControl cancelButtonText = "Cancel".Localize(); } - if (!UserSettings.Instance.IsTouchScreen) - { - this.Padding = new BorderDouble(0); //To be re-enabled once native borders are turned off - } - - this.AnchorAll(); - cancelButton = theme.CreateDialogButton(cancelButtonText); cancelButton.Margin = 0; cancelButton.Name = "Cancel Wizard Button"; - // Create the main container - mainContainer = new FlowLayoutWidget(FlowDirection.TopToBottom) - { - Padding = new BorderDouble(12, 12, 12, 0), - BackgroundColor = theme.Colors.PrimaryBackgroundColor - }; - mainContainer.AnchorAll(); - // Create the header row for the widget headerRow = new FlowLayoutWidget(FlowDirection.LeftToRight) { Name = "HeaderRow", Margin = new BorderDouble(0, 3, 0, 0), Padding = new BorderDouble(0, 12), - HAnchor = HAnchor.Stretch + HAnchor = HAnchor.Stretch, + VAnchor = VAnchor.Fit }; + this.AddChild(headerRow); headerLabel = new WrappedTextWidget("Setup Wizard".Localize(), pointSize: 24, textColor: theme.Colors.PrimaryAccentColor) { @@ -109,36 +98,28 @@ namespace MatterHackers.MatterControl HAnchor = HAnchor.Stretch, VAnchor = VAnchor.Stretch }; + this.AddChild(contentRow); // Create the footer (button) container footerRow = new FlowLayoutWidget(FlowDirection.LeftToRight) { HAnchor = HAnchor.Stretch, + VAnchor = VAnchor.Fit, Margin = new BorderDouble(0, 6), Padding = new BorderDouble(top: 4, bottom: 2) }; + this.AddChild(footerRow); - mainContainer.AddChild(headerRow); - mainContainer.AddChild(contentRow); - mainContainer.AddChild(footerRow); +#if !__ANDROID__ + headerRow.Padding = new BorderDouble(0, 3, 0, 3); -#if __ANDROID__ - if (false) + headerLabel.TextWidget.PointSize = 14; + headerLabel.TextColor = theme.Colors.PrimaryTextColor; + contentRow.Padding = new BorderDouble(5); + + footerRow.Padding = 0; + footerRow.Margin = new BorderDouble(top: theme.DefaultContainerPadding); #endif - { - mainContainer.Padding = new BorderDouble(3, 5, 3, 0); - headerRow.Padding = new BorderDouble(0, 3, 0, 3); - - headerLabel.TextWidget.PointSize = 14; - headerLabel.TextColor = theme.Colors.PrimaryTextColor; - contentRow.Padding = new BorderDouble(5); - - // TODO: current layout bugs prevent bottom margin from having an effect and bounds are simply clipped - footerRow.Margin = new BorderDouble(top: theme.DefaultContainerPadding, bottom: 4); - footerRow.Padding = 0; - } - - this.AddChild(mainContainer); } public DialogWindow WizardWindow { get; set; } diff --git a/StaticData/Icons/filetypes/folder.png b/StaticData/Icons/filetypes/folder.png new file mode 100644 index 000000000..b947813d0 Binary files /dev/null and b/StaticData/Icons/filetypes/folder.png differ diff --git a/Submodules/agg-sharp b/Submodules/agg-sharp index fd72d1170..4941ff4ac 160000 --- a/Submodules/agg-sharp +++ b/Submodules/agg-sharp @@ -1 +1 @@ -Subproject commit fd72d11704dbac9019a5cc106461fbb8ac3b4b26 +Subproject commit 4941ff4ac5d66df3626967bf037e2149aee69029