small ux fixes

This commit is contained in:
Alex Bezdieniezhnykh
2025-03-04 13:30:13 +02:00
parent a493606f64
commit 792abce8c4
8 changed files with 305 additions and 14 deletions
@@ -13,11 +13,26 @@ public class DetectionClassChangedEventArgs(DetectionClass detectionClass, int c
public partial class DetectionClasses
{
public event EventHandler<DetectionClassChangedEventArgs>? DetectionClassChanged;
public bool IsChecked = true;
private const int CaptionedMinWidth = 230;
public DetectionClasses()
{
InitializeComponent();
SizeChanged += (sender, args) =>
{
if (args.NewSize.Width < CaptionedMinWidth)
{
RegularModeButton.Text = "";
WinterModeButton.Text = "";
NightModeButton.Text = "";
}
else
{
RegularModeButton.Text = Constants.REGULAR_MODE_CAPTION;
WinterModeButton.Text= Constants.WINTER_MODE_CAPTION;
NightModeButton.Text= Constants.NIGHT_MODE_CAPTION;
}
};
}
public void Init(List<DetectionClass> detectionClasses)