Merge pull request #4339 from jlewin/master
Only show mouse down/highlight colors when popup closed
This commit is contained in:
commit
aaaa4e21d1
17 changed files with 25 additions and 13 deletions
|
|
@ -211,6 +211,7 @@ namespace MatterHackers.MatterControl
|
|||
public Color BedBackgroundColor { get; set; }
|
||||
public Color PrimaryAccentColor { get; set; }
|
||||
public Color SectionBackgroundColor { get; set; }
|
||||
public Color PopupBorderColor { get; set; }
|
||||
|
||||
public GuiWidget CreateSearchButton()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ namespace MatterHackers.MatterControl
|
|||
{
|
||||
public class ThemeSet
|
||||
{
|
||||
public static int LatestSchemeVersion { get; } = 20181103;
|
||||
public static int LatestSchemeVersion { get; } = 20190309;
|
||||
|
||||
/// <summary>
|
||||
/// The identifier to use for this combination of accent colors, theme and menu theme
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ namespace MatterHackers.MatterControl
|
|||
this.MenuItemsBorderColor = menuTheme.DropList.Open.BackgroundColor;
|
||||
|
||||
// Popup border color
|
||||
this.PopupBorderColor = AppContext.MenuTheme.BorderColor40;
|
||||
this.PopupBorderColor = theme.PopupBorderColor;
|
||||
|
||||
this.theme = theme;
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
public class DropButton : SimpleButton
|
||||
{
|
||||
public bool MenuVisible { get; private set; }
|
||||
public bool MenuVisible { get; private set; }
|
||||
|
||||
public DropButton(ThemeConfig theme)
|
||||
: base(theme)
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
this.theme = theme;
|
||||
this.DisabledColor = theme.DisabledColor;
|
||||
this.HoverColor = theme.MinimalShade;
|
||||
this.PopupBorderColor = AppContext.MenuTheme.BorderColor40;
|
||||
this.HoverColor = theme.SlightShade;
|
||||
this.MouseDownColor = theme.MinimalShade;
|
||||
this.PopupBorderColor = theme.PopupBorderColor;
|
||||
}
|
||||
|
||||
public PopupMenuButton(ImageBuffer imageBuffer, ThemeConfig theme)
|
||||
|
|
@ -65,7 +66,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
this.HoverColor = theme.ToolbarButtonHover;
|
||||
this.BackgroundColor = theme.ToolbarButtonBackground;
|
||||
this.MouseDownColor = theme.ToolbarButtonDown;
|
||||
this.PopupBorderColor = AppContext.MenuTheme.BorderColor40;
|
||||
this.PopupBorderColor = theme.PopupBorderColor;
|
||||
}
|
||||
|
||||
public PopupMenuButton(string text, ThemeConfig theme)
|
||||
|
|
@ -139,13 +140,15 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
{
|
||||
get
|
||||
{
|
||||
if (this.MouseCaptured
|
||||
if (!menuVisible
|
||||
&& this.MouseCaptured
|
||||
&& mouseInBounds
|
||||
&& this.Enabled)
|
||||
{
|
||||
return this.MouseDownColor;
|
||||
}
|
||||
else if (this.mouseInBounds
|
||||
else if (!menuVisible
|
||||
&& this.mouseInBounds
|
||||
&& this.Enabled)
|
||||
{
|
||||
return this.HoverColor;
|
||||
|
|
|
|||
|
|
@ -209,7 +209,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
new Stroke(
|
||||
new RoundedRect(popup.Widget.LocalBounds, 0),
|
||||
borderWidth * 2),
|
||||
AppContext.MenuTheme.BorderColor40);
|
||||
AppContext.Theme.PopupBorderColor);
|
||||
}
|
||||
|
||||
void widgetRelativeTo_PositionChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
BackgroundColor = menuTheme.BackgroundColor
|
||||
};
|
||||
|
||||
printPanel.AddChild(new TextWidget("Options".Localize(), textColor: menuTheme.TextColor)
|
||||
printPanel.AddChild(new TextWidget("Options".Localize(), textColor: menuTheme.TextColor, pointSize: theme.DefaultFontSize)
|
||||
{
|
||||
HAnchor = HAnchor.Left
|
||||
});
|
||||
|
|
@ -91,7 +91,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
VAnchor = VAnchor.Fit,
|
||||
Padding = 5,
|
||||
MinimumSize = new Vector2(400, 65),
|
||||
Margin = new BorderDouble(top: 10),
|
||||
};
|
||||
printPanel.AddChild(optionsPanel);
|
||||
|
||||
|
|
|
|||
|
|
@ -305,7 +305,7 @@ namespace MatterHackers.MatterControl.PartPreviewWindow
|
|||
bedMenuButton = new PopupMenuButton(AggContext.StaticData.LoadIcon("bed.png", 16, 16, theme.InvertIcons), theme)
|
||||
{
|
||||
Name = "Bed Options Menu",
|
||||
//ToolTipText = "Options",
|
||||
ToolTipText = "Bed",
|
||||
Enabled = true,
|
||||
Margin = theme.ButtonSpacing,
|
||||
VAnchor = VAnchor.Center,
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"BorderColor": "#C8C8C8",
|
||||
"BorderColor40": "#2B2B2B",
|
||||
"BorderColor20": "#383838",
|
||||
"PopupBorderColor": "#222",
|
||||
"RowBorder": "#424242",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"BorderColor": "#333333",
|
||||
"BorderColor40": "#A3A3A3",
|
||||
"BorderColor20": "#B8B8B8",
|
||||
"PopupBorderColor": "#aaa",
|
||||
"RowBorder": "#A6A6A6",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@
|
|||
"BorderColor": "#555",
|
||||
"BorderColor40": "#555555",
|
||||
"BorderColor20": "#ccc",
|
||||
"PopupBorderColor": "#ccc",
|
||||
"RowBorder": "#ddd",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
"BorderColor": "#333333",
|
||||
"BorderColor40": "#00000066",
|
||||
"BorderColor20": "#00000044",
|
||||
"PopupBorderColor": "#aaa",
|
||||
"RowBorder": "#ddd",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
"BorderColor": "#C8C8C8",
|
||||
"BorderColor40": "#00000000",
|
||||
"BorderColor20": "#00000000",
|
||||
"PopupBorderColor": "#2D2D2D",
|
||||
"RowBorder": "#333",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -44,8 +44,9 @@
|
|||
},
|
||||
"LightTextColor": "#00000000",
|
||||
"BorderColor": "#BBBBBB",
|
||||
"BorderColor40": "#555555",
|
||||
"BorderColor40": "#333",
|
||||
"BorderColor20": "#444444",
|
||||
"PopupBorderColor": "#2a2a2a",
|
||||
"RowBorder": "#333333",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"BorderColor": "#839496",
|
||||
"BorderColor40": "#094453",
|
||||
"BorderColor20": "#073642",
|
||||
"PopupBorderColor": "#001F28",
|
||||
"RowBorder": "#00303D",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
"BorderColor": "#666666",
|
||||
"BorderColor40": "#D3C492",
|
||||
"BorderColor20": "#F3EFE2",
|
||||
"PopupBorderColor": "#ccc",
|
||||
"RowBorder": "#dedede",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
"BorderColor": "#657B83",
|
||||
"BorderColor40": "#D3C492",
|
||||
"BorderColor20": "#F3EFE2",
|
||||
"PopupBorderColor": "#D5CFBF",
|
||||
"RowBorder": "#DBD9CB",
|
||||
"DropList": {
|
||||
"Open": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue