From 9df2078d0d2139a26876dd1c49d08defef9c1f8b Mon Sep 17 00:00:00 2001 From: Lars Brubaker Date: Tue, 4 Aug 2020 14:56:27 -0700 Subject: [PATCH] fixed more scaling issues --- .../AboutPage/UpdateControlView.cs | 2 +- .../ActionBar/TemperatureWidgetBase.cs | 2 +- .../ActionBar/TemperatureWidgetBed.cs | 2 +- .../ApplicationView/ApplicationController.cs | 4 +-- .../ApplicationView/BrandMenuButton.cs | 2 +- .../CustomWidgets/CalibrationTabWidget.cs | 2 +- .../Library/Widgets/ExpandCheckboxButton.cs | 4 +-- .../Library/Widgets/ListView/IconListView.cs | 2 +- .../GCodeDetails/GCodeOptionsPanel.cs | 6 ++--- .../PartPreviewWindow/HelpSearchResultRow.cs | 2 +- .../PartPreviewWindow/PartTabPage.cs | 26 ++++++++++++++++--- .../PartPreviewWindow/PrinterTabPage.cs | 2 +- .../PartPreviewWindow/RenderOptionsButton.cs | 2 +- .../PartPreviewWindow/RunningTaskRow.cs | 6 ++--- .../PartPreviewWindow/SearchPanel.cs | 2 +- MatterControlLib/PartPreviewWindow/Tabs.cs | 2 +- .../View3D/ColorSwatchSelector.cs | 6 ++--- .../View3D/PrinterBar/PrinterActionsBar.cs | 2 +- .../PartPreviewWindow/View3D/View3DWidget.cs | 4 +-- .../ControlWidgets/CalibrationControls.cs | 2 +- .../ControlWidgets/MovementControls.cs | 2 +- .../SetupWizard/HelpArticleTreeNode.cs | 2 +- .../SlicerConfiguration/SliceSettingsRow.cs | 2 +- .../UIFields/ComPortField.cs | 2 +- .../UIFields/IpAddessField.cs | 2 +- .../Utilities/MarkdigAgg/AggListRenderer.cs | 2 +- 26 files changed, 56 insertions(+), 38 deletions(-) diff --git a/MatterControlLib/AboutPage/UpdateControlView.cs b/MatterControlLib/AboutPage/UpdateControlView.cs index c0c7a7715..e3c7986ad 100644 --- a/MatterControlLib/AboutPage/UpdateControlView.cs +++ b/MatterControlLib/AboutPage/UpdateControlView.cs @@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl this.AddChild(new HorizontalSpacer()); - checkUpdateButton = new IconButton(AggContext.StaticData.LoadIcon("fa-refresh_14.png", theme.InvertIcons), theme) + checkUpdateButton = new IconButton(AggContext.StaticData.LoadIcon("fa-refresh_14.png", 14, 14, theme.InvertIcons), theme) { ToolTipText = "Check for Update".Localize(), BackgroundColor = theme.MinimalShade, diff --git a/MatterControlLib/ActionBar/TemperatureWidgetBase.cs b/MatterControlLib/ActionBar/TemperatureWidgetBase.cs index 97f4b2f5a..5d7178c10 100644 --- a/MatterControlLib/ActionBar/TemperatureWidgetBase.cs +++ b/MatterControlLib/ActionBar/TemperatureWidgetBase.cs @@ -65,7 +65,7 @@ namespace MatterHackers.MatterControl.ActionBar this.MakeScrollable = false; this.AlignToRightEdge = true; - ImageWidget = new ImageWidget(AggContext.StaticData.LoadIcon("hotend.png", theme.InvertIcons)) + ImageWidget = new ImageWidget(AggContext.StaticData.LoadIcon("hotend.png", 14, 14, theme.InvertIcons)) { VAnchor = VAnchor.Center, Margin = new BorderDouble(right: 5) diff --git a/MatterControlLib/ActionBar/TemperatureWidgetBed.cs b/MatterControlLib/ActionBar/TemperatureWidgetBed.cs index f105ba2c6..a43f52313 100644 --- a/MatterControlLib/ActionBar/TemperatureWidgetBed.cs +++ b/MatterControlLib/ActionBar/TemperatureWidgetBed.cs @@ -56,7 +56,7 @@ namespace MatterHackers.MatterControl.ActionBar this.DisplayCurrentTemperature(); this.ToolTipText = "Bed Temperature".Localize(); - this.ImageWidget.Image = AggContext.StaticData.LoadIcon("bed.png", theme.InvertIcons); + this.ImageWidget.Image = AggContext.StaticData.LoadIcon("bed.png", 16, 16, theme.InvertIcons); this.PopupContent = this.GetPopupContent(ApplicationController.Instance.MenuTheme); diff --git a/MatterControlLib/ApplicationView/ApplicationController.cs b/MatterControlLib/ApplicationView/ApplicationController.cs index a52d1a080..3d7642edb 100644 --- a/MatterControlLib/ApplicationView/ApplicationController.cs +++ b/MatterControlLib/ApplicationView/ApplicationController.cs @@ -3045,7 +3045,7 @@ namespace MatterHackers.MatterControl internal void GetViewOptionButtons(GuiWidget parent, ISceneContext sceneContext, PrinterConfig printer, ThemeConfig theme) { - var bedButton = new RadioIconButton(AggContext.StaticData.LoadIcon("bed.png", theme.InvertIcons), theme) + var bedButton = new RadioIconButton(AggContext.StaticData.LoadIcon("bed.png", 16, 16, theme.InvertIcons), theme) { Name = "Bed Button", ToolTipText = "Show Print Bed".Localize(), @@ -3065,7 +3065,7 @@ namespace MatterHackers.MatterControl Func buildHeightValid = () => sceneContext.BuildHeight > 0; - var printAreaButton = new RadioIconButton(AggContext.StaticData.LoadIcon("print_area.png", theme.InvertIcons), theme) + var printAreaButton = new RadioIconButton(AggContext.StaticData.LoadIcon("print_area.png", 16, 16, theme.InvertIcons), theme) { Name = "Bed Button", ToolTipText = buildHeightValid() ? "Show Print Area".Localize() : "Define printer build height to enable", diff --git a/MatterControlLib/ApplicationView/BrandMenuButton.cs b/MatterControlLib/ApplicationView/BrandMenuButton.cs index a520b6260..672eedc7b 100644 --- a/MatterControlLib/ApplicationView/BrandMenuButton.cs +++ b/MatterControlLib/ApplicationView/BrandMenuButton.cs @@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl }; this.AddChild(row); - row.AddChild(new IconButton(AggContext.StaticData.LoadIcon("mh-app-logo.png", theme.InvertIcons), theme) + row.AddChild(new IconButton(AggContext.StaticData.LoadIcon("mh-app-logo.png", 16, 16, theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, diff --git a/MatterControlLib/CustomWidgets/CalibrationTabWidget.cs b/MatterControlLib/CustomWidgets/CalibrationTabWidget.cs index ec68aa833..f1acdf6d8 100644 --- a/MatterControlLib/CustomWidgets/CalibrationTabWidget.cs +++ b/MatterControlLib/CustomWidgets/CalibrationTabWidget.cs @@ -322,7 +322,7 @@ namespace MatterHackers.MatterControl static CalibrationPad() { - activeIcon = AggContext.StaticData.LoadIcon("fa-check_16.png", true); + activeIcon = AggContext.StaticData.LoadIcon("fa-check_16.png", 16, 16, true); inactiveIcon = new ImageBuffer(16, 16); } diff --git a/MatterControlLib/Library/Widgets/ExpandCheckboxButton.cs b/MatterControlLib/Library/Widgets/ExpandCheckboxButton.cs index 7defa161f..70209b291 100644 --- a/MatterControlLib/Library/Widgets/ExpandCheckboxButton.cs +++ b/MatterControlLib/Library/Widgets/ExpandCheckboxButton.cs @@ -54,8 +54,8 @@ namespace MatterHackers.MatterControl.CustomWidgets public ExpandCheckboxButton(string text, ThemeConfig theme, int pointSize = 11, bool expandable = true) { - arrowRight = AggContext.StaticData.LoadIcon("fa-angle-right_12.png", theme.InvertIcons); - arrowDown = AggContext.StaticData.LoadIcon("fa-angle-down_12.png", theme.InvertIcons); + arrowRight = AggContext.StaticData.LoadIcon("fa-angle-right_12.png", 12, 12, theme.InvertIcons); + arrowDown = AggContext.StaticData.LoadIcon("fa-angle-down_12.png", 12, 12, theme.InvertIcons); imageButton = new IconButton(arrowRight, theme) { diff --git a/MatterControlLib/Library/Widgets/ListView/IconListView.cs b/MatterControlLib/Library/Widgets/ListView/IconListView.cs index bf5fc6859..4ca3763a8 100644 --- a/MatterControlLib/Library/Widgets/ListView/IconListView.cs +++ b/MatterControlLib/Library/Widgets/ListView/IconListView.cs @@ -260,7 +260,7 @@ namespace MatterHackers.MatterControl.CustomWidgets public class IconViewItem : ListViewItemBase { - private static ImageBuffer loadingImage = AggContext.StaticData.LoadIcon("IC_32x32.png"); + private static ImageBuffer loadingImage = AggContext.StaticData.LoadIcon("IC_32x32.png", 32, 32); internal static int ItemPadding = 0; diff --git a/MatterControlLib/PartPreviewWindow/GCodeDetails/GCodeOptionsPanel.cs b/MatterControlLib/PartPreviewWindow/GCodeDetails/GCodeOptionsPanel.cs index 9f3c60987..2d8bc65a8 100644 --- a/MatterControlLib/PartPreviewWindow/GCodeDetails/GCodeOptionsPanel.cs +++ b/MatterControlLib/PartPreviewWindow/GCodeDetails/GCodeOptionsPanel.cs @@ -60,7 +60,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow var buttonGroup = new ObservableCollection(); - speedsButton = new RadioIconButton(AggContext.StaticData.LoadIcon("speeds.png", theme.InvertIcons), theme) + speedsButton = new RadioIconButton(AggContext.StaticData.LoadIcon("speeds.png", 16, 16, theme.InvertIcons), theme) { SiblingRadioButtonList = buttonGroup, Name = "Speeds Button", @@ -73,7 +73,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow buttonPanel.AddChild(speedsButton); - materialsButton = new RadioIconButton(AggContext.StaticData.LoadIcon("materials.png", theme.InvertIcons), theme) + materialsButton = new RadioIconButton(AggContext.StaticData.LoadIcon("materials.png", 16, 16, theme.InvertIcons), theme) { SiblingRadioButtonList = buttonGroup, Name = "Materials Button", @@ -86,7 +86,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow buttonPanel.AddChild(materialsButton); - noColorButton = new RadioIconButton(AggContext.StaticData.LoadIcon("no-color.png", theme.InvertIcons), theme) + noColorButton = new RadioIconButton(AggContext.StaticData.LoadIcon("no-color.png", 16, 16, theme.InvertIcons), theme) { SiblingRadioButtonList = buttonGroup, Name = "No Color Button", diff --git a/MatterControlLib/PartPreviewWindow/HelpSearchResultRow.cs b/MatterControlLib/PartPreviewWindow/HelpSearchResultRow.cs index db24dd195..bc9a74bad 100644 --- a/MatterControlLib/PartPreviewWindow/HelpSearchResultRow.cs +++ b/MatterControlLib/PartPreviewWindow/HelpSearchResultRow.cs @@ -35,7 +35,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public class HelpSearchResultRow : SettingsRow { public HelpSearchResultRow(HelpSearchResult searchResult, ThemeConfig theme) - : base(searchResult.Name, null, theme, AggContext.StaticData.LoadIcon("fa-text-file_16.png"), fullRowSelect: true) + : base(searchResult.Name, null, theme, AggContext.StaticData.LoadIcon("fa-text-file_16.png", 16, 16), fullRowSelect: true) { this.SearchResult = searchResult; diff --git a/MatterControlLib/PartPreviewWindow/PartTabPage.cs b/MatterControlLib/PartPreviewWindow/PartTabPage.cs index 2a0f6a63c..94480a773 100644 --- a/MatterControlLib/PartPreviewWindow/PartTabPage.cs +++ b/MatterControlLib/PartPreviewWindow/PartTabPage.cs @@ -34,6 +34,7 @@ using MatterHackers.Agg.UI; using MatterHackers.MatterControl.CustomWidgets; using MatterHackers.MatterControl.Library; using MatterHackers.VectorMath; +using ObjParser; namespace MatterHackers.MatterControl.PartPreviewWindow { @@ -144,6 +145,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Name = "LibraryView", // Drop containers ContainerFilter = (container) => false, + // HAnchor = HAnchor.Fit, HAnchor = HAnchor.Absolute, VAnchor = VAnchor.Stretch, AllowContextMenu = false, @@ -155,8 +157,20 @@ namespace MatterHackers.MatterControl.PartPreviewWindow VAnchor = VAnchor.Fit | VAnchor.Top }, }; + // favoritesBar.ScrollArea.HAnchor = HAnchor.Fit; + favoritesBar.ListContentView.HAnchor = HAnchor.Fit; leftBar.AddChild(favoritesBar); + void UpdateWidth(object s, EventArgs e) + { + if (s is GuiWidget widget) + { + favoritesBar.Width = widget.Width; + } + } + + favoritesBar.ListContentView.BoundsChanged += UpdateWidth; + favoritesBar.ScrollArea.VAnchor = VAnchor.Fit; var expandedImage = AggContext.StaticData.LoadIcon("expand.png", 16, 16, theme.InvertIcons); @@ -171,18 +185,22 @@ namespace MatterHackers.MatterControl.PartPreviewWindow Width = theme.ButtonHeight - 6 * GuiWidget.DeviceScale }; - expandBarButton.Click += (s, e) => UiThread.RunOnIdle(() => + expandBarButton.Click += (s, e) => UiThread.RunOnIdle(async () => { expanded = !expanded; + // remove from the one we are deleting + favoritesBar.ListContentView.BoundsChanged -= UpdateWidth; UserSettings.Instance.set(UserSettingsKey.FavoritesBarExpansion, expanded ? "1" : "0"); - favoritesBar.ListContentView = new IconView(theme, expanded ? 48 * GuiWidget.DeviceScale : 24 * GuiWidget.DeviceScale); - favoritesBar.Width = expanded ? 55 * GuiWidget.DeviceScale : 33 * GuiWidget.DeviceScale; + favoritesBar.ListContentView.HAnchor = HAnchor.Fit; + // add to the one we created + favoritesBar.ListContentView.BoundsChanged += UpdateWidth; expandBarButton.SetIcon(expanded ? collapsedImage : expandedImage); expandBarButton.Invalidate(); - favoritesBar.Reload().ConfigureAwait(false); + await favoritesBar.Reload(); + UpdateWidth(favoritesBar.ListContentView, null); }); leftBar.AddChild(expandBarButton); diff --git a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs index 9010625ca..5d1f327df 100644 --- a/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs +++ b/MatterControlLib/PartPreviewWindow/PrinterTabPage.cs @@ -864,7 +864,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow } } - timeContainer.AddChild(new ImageWidget(AggContext.StaticData.LoadIcon("fa-clock_24.png", theme.InvertIcons)) + timeContainer.AddChild(new ImageWidget(AggContext.StaticData.LoadIcon("fa-clock_24.png", 24, 24, theme.InvertIcons)) { VAnchor = VAnchor.Center }); diff --git a/MatterControlLib/PartPreviewWindow/RenderOptionsButton.cs b/MatterControlLib/PartPreviewWindow/RenderOptionsButton.cs index b23709edc..1df43f355 100644 --- a/MatterControlLib/PartPreviewWindow/RenderOptionsButton.cs +++ b/MatterControlLib/PartPreviewWindow/RenderOptionsButton.cs @@ -42,7 +42,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow this.HAnchor = HAnchor.Fit; this.VAnchor = VAnchor.Fit; - this.AddChild(new IconButton(AggContext.StaticData.LoadIcon("web.png", theme.InvertIcons), theme) + this.AddChild(new IconButton(AggContext.StaticData.LoadIcon("web.png", 16, 16, theme.InvertIcons), theme) { Selectable = false }); diff --git a/MatterControlLib/PartPreviewWindow/RunningTaskRow.cs b/MatterControlLib/PartPreviewWindow/RunningTaskRow.cs index 89debcba9..5415e4714 100644 --- a/MatterControlLib/PartPreviewWindow/RunningTaskRow.cs +++ b/MatterControlLib/PartPreviewWindow/RunningTaskRow.cs @@ -103,7 +103,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow IconButton resumeButton = null; - var pauseButton = new IconButton(AggContext.StaticData.LoadIcon("fa-pause_12.png", theme.InvertIcons), theme) + var pauseButton = new IconButton(AggContext.StaticData.LoadIcon("fa-pause_12.png", 12, 12, theme.InvertIcons), theme) { Margin = theme.ButtonSpacing, Enabled = taskDetails.Options?.PauseAction != null, @@ -139,7 +139,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; topRow.AddChild(pauseButton); - resumeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-play_12.png", theme.InvertIcons), theme) + resumeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-play_12.png", 12, 12, theme.InvertIcons), theme) { Visible = false, Margin = theme.ButtonSpacing, @@ -154,7 +154,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; topRow.AddChild(resumeButton); - var stopButton = new IconButton(AggContext.StaticData.LoadIcon("fa-stop_12.png", theme.InvertIcons), theme) + var stopButton = new IconButton(AggContext.StaticData.LoadIcon("fa-stop_12.png", 12, 12, theme.InvertIcons), theme) { Margin = theme.ButtonSpacing, Name = "Stop Task Button", diff --git a/MatterControlLib/PartPreviewWindow/SearchPanel.cs b/MatterControlLib/PartPreviewWindow/SearchPanel.cs index de57cfc4a..22bb9234b 100644 --- a/MatterControlLib/PartPreviewWindow/SearchPanel.cs +++ b/MatterControlLib/PartPreviewWindow/SearchPanel.cs @@ -102,7 +102,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow if (searchResults.Children.Count == 0) { - searchResults.AddChild(new SettingsRow("No results found".Localize(), null, theme, AggContext.StaticData.LoadIcon("StatusInfoTip_16x.png").SetPreMultiply())); + searchResults.AddChild(new SettingsRow("No results found".Localize(), null, theme, AggContext.StaticData.LoadIcon("StatusInfoTip_16x.png", 16, 16).SetPreMultiply())); } // Add top border to first child diff --git a/MatterControlLib/PartPreviewWindow/Tabs.cs b/MatterControlLib/PartPreviewWindow/Tabs.cs index 7d02091db..5cd1807b9 100644 --- a/MatterControlLib/PartPreviewWindow/Tabs.cs +++ b/MatterControlLib/PartPreviewWindow/Tabs.cs @@ -255,7 +255,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow this.TabBar.ActionArea.AddChild(tabTrailer); - var plusTabButton = new NewTabButton(AggContext.StaticData.LoadIcon("fa-plus_12.png", theme.InvertIcons), theme) + var plusTabButton = new NewTabButton(AggContext.StaticData.LoadIcon("fa-plus_12.png", 12, 12, theme.InvertIcons), theme) { Height = 20, }; diff --git a/MatterControlLib/PartPreviewWindow/View3D/ColorSwatchSelector.cs b/MatterControlLib/PartPreviewWindow/View3D/ColorSwatchSelector.cs index 57170732a..e52c3efad 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/ColorSwatchSelector.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/ColorSwatchSelector.cs @@ -66,7 +66,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow // put in white and black buttons colorRow.AddChild(MakeColorButton(grayLevel[rowIndex], scaledButtonSize, buttonSpacing, colorChanged)); - switch(rowIndex) + switch (rowIndex) { case 0: var resetButton = new IconButton(AggContext.StaticData.LoadIcon("transparent_grid.png"), theme) @@ -130,7 +130,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public override Color BackgroundColor { - get => (this.Enabled) ? base.BackgroundColor : this.DisabledColor; + get => this.Enabled ? base.BackgroundColor : this.DisabledColor; set { base.BackgroundColor = value; @@ -172,7 +172,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public static Color ToGrayscale(this Color color) { int y = (color.red * 77) + (color.green * 151) + (color.blue * 28); - int gray = (y >> 8); + int gray = y >> 8; return new Color(gray, gray, gray, 255); } diff --git a/MatterControlLib/PartPreviewWindow/View3D/PrinterBar/PrinterActionsBar.cs b/MatterControlLib/PartPreviewWindow/View3D/PrinterBar/PrinterActionsBar.cs index 11e4de78b..459e939bd 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/PrinterBar/PrinterActionsBar.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/PrinterBar/PrinterActionsBar.cs @@ -357,7 +357,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow DialogWindow.Show(new PrinterCalibrationWizard(printer, theme)); }); }), - Icon = AggContext.StaticData.LoadIcon("compass.png", theme.InvertIcons) + Icon = AggContext.StaticData.LoadIcon("compass.png", 16, 16, theme.InvertIcons) }, new ActionSeparator(), new NamedAction() diff --git a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs index dbfa9432c..666d30f1d 100644 --- a/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs +++ b/MatterControlLib/PartPreviewWindow/View3D/View3DWidget.cs @@ -238,7 +238,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow titleAndTreeView.AddChild(treeView); workspaceName.ActionArea.AddChild( - new IconButton(AggContext.StaticData.LoadIcon("fa-angle-right_12.png", theme.InvertIcons), theme) + new IconButton(AggContext.StaticData.LoadIcon("fa-angle-right_12.png", 12, 12, theme.InvertIcons), theme) { Enabled = false }, @@ -286,7 +286,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow }; this.InteractionLayer.AddChild(viewOptionsBar); - var homeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-home_16.png", theme.InvertIcons), theme) + var homeButton = new IconButton(AggContext.StaticData.LoadIcon("fa-home_16.png", 16, 16, theme.InvertIcons), theme) { VAnchor = VAnchor.Absolute, ToolTipText = "Reset View".Localize(), diff --git a/MatterControlLib/PrinterControls/ControlWidgets/CalibrationControls.cs b/MatterControlLib/PrinterControls/ControlWidgets/CalibrationControls.cs index b05a1b34d..947d4867f 100644 --- a/MatterControlLib/PrinterControls/ControlWidgets/CalibrationControls.cs +++ b/MatterControlLib/PrinterControls/ControlWidgets/CalibrationControls.cs @@ -59,7 +59,7 @@ namespace MatterHackers.MatterControl.PrinterControls null, theme)); - var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("compass.png", theme.InvertIcons), theme) + var runWizardButton = new IconButton(AggContext.StaticData.LoadIcon("compass.png", 16, 16, theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, diff --git a/MatterControlLib/PrinterControls/ControlWidgets/MovementControls.cs b/MatterControlLib/PrinterControls/ControlWidgets/MovementControls.cs index b87967723..36e643b40 100644 --- a/MatterControlLib/PrinterControls/ControlWidgets/MovementControls.cs +++ b/MatterControlLib/PrinterControls/ControlWidgets/MovementControls.cs @@ -128,7 +128,7 @@ namespace MatterHackers.MatterControl.PrinterControls Margin = new BorderDouble(bottom: 10) }; - var homeIcon = new IconButton(AggContext.StaticData.LoadIcon("fa-home_16.png", theme.InvertIcons), theme) + var homeIcon = new IconButton(AggContext.StaticData.LoadIcon("fa-home_16.png", 16, 16, theme.InvertIcons), theme) { ToolTipText = "Home X, Y and Z".Localize(), BackgroundColor = theme.MinimalShade, diff --git a/MatterControlLib/SetupWizard/HelpArticleTreeNode.cs b/MatterControlLib/SetupWizard/HelpArticleTreeNode.cs index 21356e6f8..99f413d8d 100644 --- a/MatterControlLib/SetupWizard/HelpArticleTreeNode.cs +++ b/MatterControlLib/SetupWizard/HelpArticleTreeNode.cs @@ -40,7 +40,7 @@ namespace MatterHackers.MatterControl this.HelpArticle = helpArticle; this.Text = helpArticle.Name; this.Tag = helpArticle; - this.Image = AggContext.StaticData.LoadIcon("fa-text-file_16.png"); + this.Image = AggContext.StaticData.LoadIcon("fa-text-file_16.png", 16, 16); } public HelpArticle HelpArticle { get; } diff --git a/MatterControlLib/SlicerConfiguration/SliceSettingsRow.cs b/MatterControlLib/SlicerConfiguration/SliceSettingsRow.cs index e1cca8999..a3a7cc5c5 100644 --- a/MatterControlLib/SlicerConfiguration/SliceSettingsRow.cs +++ b/MatterControlLib/SlicerConfiguration/SliceSettingsRow.cs @@ -453,7 +453,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration this.HAnchor = HAnchor.Fit; this.Padding = new BorderDouble(left: 5); - exclamation = AggContext.StaticData.LoadIcon("exclamation.png"); + exclamation = AggContext.StaticData.LoadIcon("exclamation.png", 4, 12); this.Border = new BorderDouble(bottom: 1); } diff --git a/MatterControlLib/SlicerConfiguration/UIFields/ComPortField.cs b/MatterControlLib/SlicerConfiguration/UIFields/ComPortField.cs index 369dd936a..ab18f8a80 100644 --- a/MatterControlLib/SlicerConfiguration/UIFields/ComPortField.cs +++ b/MatterControlLib/SlicerConfiguration/UIFields/ComPortField.cs @@ -103,7 +103,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration unregisterEvents?.Invoke(null, null); }; - var configureIcon = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", theme.InvertIcons), theme) + var configureIcon = new IconButton(AggContext.StaticData.LoadIcon("fa-cog_16.png", 16, 16, theme.InvertIcons), theme) { VAnchor = VAnchor.Center, Margin = theme.ButtonSpacing, diff --git a/MatterControlLib/SlicerConfiguration/UIFields/IpAddessField.cs b/MatterControlLib/SlicerConfiguration/UIFields/IpAddessField.cs index 42651122a..a170f010d 100644 --- a/MatterControlLib/SlicerConfiguration/UIFields/IpAddessField.cs +++ b/MatterControlLib/SlicerConfiguration/UIFields/IpAddessField.cs @@ -64,7 +64,7 @@ namespace MatterHackers.MatterControl.SlicerConfiguration var widget = new FlowLayoutWidget(); widget.AddChild(dropdownList); - refreshButton = new IconButton(AggContext.StaticData.LoadIcon("fa-refresh_14.png", theme.InvertIcons), theme) + refreshButton = new IconButton(AggContext.StaticData.LoadIcon("fa-refresh_14.png", 14, 14, theme.InvertIcons), theme) { Margin = new BorderDouble(left: 5) }; diff --git a/MatterControlLib/Utilities/MarkdigAgg/AggListRenderer.cs b/MatterControlLib/Utilities/MarkdigAgg/AggListRenderer.cs index ec75b0e6f..3905a803a 100644 --- a/MatterControlLib/Utilities/MarkdigAgg/AggListRenderer.cs +++ b/MatterControlLib/Utilities/MarkdigAgg/AggListRenderer.cs @@ -39,7 +39,7 @@ namespace Markdig.Renderers.Agg this.VAnchor = VAnchor.Fit; this.HAnchor = HAnchor.Stretch; - base.AddChild(new ImageWidget(AggContext.StaticData.LoadIcon("bullet.png", theme.InvertIcons)) + base.AddChild(new ImageWidget(AggContext.StaticData.LoadIcon("bullet.png", 16, 16, theme.InvertIcons)) { Margin = new BorderDouble(top: 1, left: 10), VAnchor = VAnchor.Top,