Add frame to press
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Windows;
|
||||
using System.Reflection;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Shapes;
|
||||
@@ -87,18 +88,16 @@ namespace PamhagenSysCtrl.Helpers.Pipeline {
|
||||
}
|
||||
|
||||
public void Update(bool isHovering, bool isPressed) {
|
||||
_rect?.Fill =
|
||||
isHovering && isPressed ? Brushes.DarkGray :
|
||||
isHovering ? Brushes.LightGray :
|
||||
Brushes.WhiteSmoke;
|
||||
_hopperInner?.Fill =
|
||||
isHovering && isPressed ? Brushes.DarkGray :
|
||||
isHovering ? Brushes.LightGray :
|
||||
Brushes.WhiteSmoke;
|
||||
_bottomInner?.Fill =
|
||||
isHovering && isPressed ? Brushes.DarkGray :
|
||||
isHovering ? Brushes.LightGray :
|
||||
var color =
|
||||
IsActive && isHovering && isPressed ? PamhagenBrushes.Red :
|
||||
IsActive && isHovering ? PamhagenBrushes.Red :
|
||||
!IsActive && isHovering && isPressed ? PamhagenBrushes.Green :
|
||||
!IsActive && isHovering ? PamhagenBrushes.Green :
|
||||
IsActive ? PamhagenBrushes.Green :
|
||||
Brushes.WhiteSmoke;
|
||||
_rect?.Fill = color;
|
||||
_hopperInner?.Fill = color;
|
||||
_bottomInner?.Fill = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user