Add frame to press

This commit is contained in:
2026-07-16 01:11:31 +02:00
parent 3f6fba36e0
commit 62f227ca03
3 changed files with 36 additions and 20 deletions
+11 -12
View File
@@ -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;
}
}
}