Merge pull request #2654 from jlewin/design_tools
Use new Popup menu checkbox style
This commit is contained in:
commit
b940bff02e
4 changed files with 15 additions and 16 deletions
|
|
@ -455,8 +455,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
public ApplicationController()
|
||||
{
|
||||
ScrollBar.DefaultMargin = new BorderDouble(right: 3);
|
||||
ScrollBar.ScrollBarWidth = 10 * GuiWidget.DeviceScale;
|
||||
ScrollBar.DefaultMargin = new BorderDouble(right: 1);
|
||||
ScrollBar.ScrollBarWidth = 8 * GuiWidget.DeviceScale;
|
||||
ScrollBar.GrowThumbBy = 2;
|
||||
|
||||
DefaultThumbBackground.DefaultBackgroundColor = Color.Transparent;
|
||||
|
||||
Object3D.AssetsPath = ApplicationDataStorage.Instance.LibraryAssetsPath;
|
||||
|
|
|
|||
|
|
@ -56,9 +56,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
|
||||
public HorizontalLine CreateHorizontalLine()
|
||||
{
|
||||
var line = new HorizontalLine(30)
|
||||
var line = new HorizontalLine(40)
|
||||
{
|
||||
Margin = new BorderDouble(PopupMenu.GutterWidth - 5, 2, 5, 2)
|
||||
Margin = new BorderDouble(PopupMenu.GutterWidth - 8, 1, 8, 1)
|
||||
};
|
||||
|
||||
this.AddChild(line);
|
||||
|
|
@ -136,7 +136,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
if (this.Image != null)
|
||||
{
|
||||
var x = this.Image.Width / 2 - PopupMenu.GutterWidth;
|
||||
var x = this.Image.Width / 2 - PopupMenu.GutterWidth + 2;
|
||||
var y = this.Size.Y / 2 - this.Image.Height / 2;
|
||||
|
||||
graphics2D.Render(this.Image, x, y);
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ of the authors and should not be interpreted as representing official policies,
|
|||
either expressed or implied, of the FreeBSD Project.
|
||||
*/
|
||||
using MatterHackers.Agg;
|
||||
using MatterHackers.Agg.Platform;
|
||||
using MatterHackers.Agg.UI;
|
||||
using MatterHackers.Localizations;
|
||||
using MatterHackers.MatterControl.PartPreviewWindow;
|
||||
|
|
@ -50,20 +51,16 @@ namespace MatterHackers.MatterControl.SlicerConfiguration
|
|||
{
|
||||
var popupMenu = new PopupMenu(ApplicationController.Instance.Theme);
|
||||
|
||||
var showHelpBox = new CheckBox("Show Help".Localize());
|
||||
showHelpBox.Checked = sliceSettingsWidget.ShowHelpControls;
|
||||
showHelpBox.CheckedStateChanged += (s, e) =>
|
||||
var checkedIcon = AggContext.StaticData.LoadIcon("fa-check_16.png");
|
||||
|
||||
var icon = sliceSettingsWidget.ShowHelpControls ? checkedIcon : null;
|
||||
|
||||
popupMenu.CreateMenuItem("Show Help".Localize(), icon).Click += (s, e) =>
|
||||
{
|
||||
sliceSettingsWidget.ShowHelpControls = showHelpBox.Checked;
|
||||
sliceSettingsWidget.ShowHelpControls = !sliceSettingsWidget.ShowHelpControls;
|
||||
sliceSettingsWidget.RebuildSliceSettingsTabs();
|
||||
};
|
||||
|
||||
|
||||
popupMenu.AddChild(new MenuItem(showHelpBox, "Show Help Checkbox")
|
||||
{
|
||||
Padding = PopupMenu.MenuPadding,
|
||||
});
|
||||
|
||||
popupMenu.CreateHorizontalLine();
|
||||
|
||||
PopupMenu.MenuItem menuItem;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit e5df5c1f3351dfb7e06439ed4f76b9e9703f03f4
|
||||
Subproject commit 157ae3944409f34e7381ef0c72d8022a34914111
|
||||
Loading…
Add table
Add a link
Reference in a new issue