mirror of
https://github.com/azaion/annotations.git
synced 2026-04-22 11:16:30 +00:00
small ux fixes
This commit is contained in:
@@ -82,4 +82,12 @@ public class Constants
|
||||
|
||||
#endregion
|
||||
|
||||
#region Mode Captions
|
||||
|
||||
public const string REGULAR_MODE_CAPTION = "Норма";
|
||||
public const string WINTER_MODE_CAPTION = "Зима";
|
||||
public const string NIGHT_MODE_CAPTION = "Ніч";
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
@@ -87,7 +87,7 @@
|
||||
Tag="0"
|
||||
GroupName="Mode"
|
||||
Checked="ModeRadioButton_Checked"
|
||||
IsChecked="{Binding IsChecked}"
|
||||
IsChecked="True"
|
||||
Style="{StaticResource ButtonRadioButtonStyle}">
|
||||
<StackPanel Orientation="Horizontal">
|
||||
<Image Height="16" Width="16">
|
||||
@@ -111,9 +111,9 @@
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock Text="Норма"
|
||||
Padding="7"
|
||||
/>
|
||||
<TextBlock Name="RegularModeButton"
|
||||
Padding="3"
|
||||
/>
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="EveningModeRadioButton"
|
||||
@@ -142,9 +142,9 @@
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock Text="Зима"
|
||||
Padding="7"
|
||||
/>
|
||||
<TextBlock Name="WinterModeButton"
|
||||
Padding="3"
|
||||
/>
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
<RadioButton x:Name="NightModeRadioButton"
|
||||
@@ -173,9 +173,9 @@
|
||||
</DrawingImage>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<TextBlock Text="Ніч"
|
||||
Padding="7"
|
||||
/>
|
||||
<TextBlock Name="NightModeButton"
|
||||
Padding="3"
|
||||
/>
|
||||
</StackPanel>
|
||||
</RadioButton>
|
||||
</StackPanel>
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user