Skip to content

Commit ef8ecc0

Browse files
Many smaller UI optimizations
- Tone down validation colors - Increase padding on main tab buttons - Change icons for validation - Change validation indicator on a tab having an issue - Change validation indicator in settings -> tools - Some additional cleanup
1 parent f5c851f commit ef8ecc0

File tree

8 files changed

+158
-99
lines changed

8 files changed

+158
-99
lines changed

src/Otor.MsixHero.App/Controls/PackageExpert/Views/Body.xaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
</ScrollViewer>
9898
</TabItem>
9999
<TabItem Header="Content">
100-
<TabControl Margin="0 -7 0 0">
100+
<TabControl Margin="0 -10 0 0">
101101
<TabItem
102102
DataContext="{Binding Manifest.CurrentValue}"
103103
Style="{StaticResource Compact}">
@@ -591,8 +591,9 @@
591591
</TabItem>
592592
<TabItem
593593
Header="Installation">
594-
<TabControl Margin="0 -7 0 0">
595-
<TabItem>
594+
<TabControl Margin="0 -10 0 0">
595+
<TabItem
596+
Style="{StaticResource Compact}">
596597
<TabItem.Header>
597598
<StackPanel Orientation="Horizontal">
598599
<TextBlock>
@@ -717,7 +718,8 @@
717718
</StackPanel>
718719
</ScrollViewer>
719720
</TabItem>
720-
<TabItem>
721+
<TabItem
722+
Style="{StaticResource Compact}">
721723
<TabItem.Header>
722724
<StackPanel Orientation="Horizontal">
723725
<TextBlock>

src/Otor.MsixHero.App/Modules/Dialogs/Settings/View/SettingsView.xaml

Lines changed: 75 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
</UserControl.CommandBindings>
4646

4747
<DockPanel>
48-
<Border Background="Transparent" DockPanel.Dock="Top">
48+
<Border Background="Transparent" TextBlock.Foreground="Black" DockPanel.Dock="Top">
4949
<DockPanel>
5050
<Border
5151
Width="42"
@@ -78,7 +78,18 @@
7878
</TextBlock>
7979
<TextBlock
8080
Margin="8 0 0 0"
81-
Foreground="{DynamicResource SystemControlAcrylicWindowForegroundBrush}"
81+
Foreground="White"
82+
VerticalAlignment="Center"
83+
HorizontalAlignment="Left"
84+
Text="SETTINGS - MSIX HERO">
85+
<TextBlock.Effect>
86+
<BlurEffect
87+
Radius="2.0"
88+
KernelType="Box"/>
89+
</TextBlock.Effect>
90+
</TextBlock>
91+
<TextBlock
92+
Margin="8 0 0 0"
8293
VerticalAlignment="Center"
8394
HorizontalAlignment="Left"
8495
Text="SETTINGS - MSIX HERO" />
@@ -98,28 +109,46 @@
98109
</StackPanel>
99110
</Border>
100111

101-
<Border Visibility="{Binding AllSettings.IsValid, Converter={StaticResource NegativeBooleanToVisibilityConverter}}" Background="#FFDDDD" Padding="8" DockPanel.Dock="Bottom">
102-
<TextBlock Text="{Binding AllSettings.ValidationMessage}" VerticalAlignment="Center" />
112+
<Border Visibility="{Binding AllSettings.IsValid, Converter={StaticResource NegativeBooleanToVisibilityConverter}}" Background="#FFE39E" Padding="8" DockPanel.Dock="Bottom">
113+
<DockPanel>
114+
<Border
115+
DockPanel.Dock="Left"
116+
VerticalAlignment="Center"
117+
Margin="0 0 8 0"
118+
CornerRadius="14" Width="14" Height="14" Background="IndianRed" HorizontalAlignment="Right">
119+
<TextBlock Text="!" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="10" LineHeight="10" LineStackingStrategy="BlockLineHeight" FontWeight="Bold" Foreground="White" />
120+
</Border>
121+
122+
<TextBlock Text="{Binding AllSettings.ValidationMessage}" VerticalAlignment="Center" />
123+
</DockPanel>
124+
103125
</Border>
104126

105127
<Border Background="White">
106-
<TabControl SelectedIndex="1" Margin="16 0 16 16" x:Name="MainContent" view:SearchHelper.SearchString="test">
107-
<TabItem Visibility="Collapsed" Header="General">
128+
<TabControl SelectedIndex="0" Margin="16 0 16 16" x:Name="MainContent" view:SearchHelper.SearchString="test">
129+
<TabItem Header="Interface">
108130
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
109-
<UniformGrid HorizontalAlignment="Left" Rows="1" Columns="2">
110-
<Border Margin="0 0 8 8">
111-
<StackPanel>
112-
<Image Source="Images/sidebar.png" Stretch="None" />
113-
<RadioButton IsChecked="{Binding SidebarDefaultState.CurrentValue}" GroupName="g1" Content="With sidebar" Margin="0 8 0 0" />
114-
</StackPanel>
115-
</Border>
116-
<Border Margin="0 0 8 8">
117-
<StackPanel>
118-
<Image Source="Images/no-sidebar.png" Stretch="None" />
119-
<RadioButton IsChecked="{Binding SidebarDefaultState.CurrentValue, Converter={StaticResource NegativeConverter}}" Content="Without sidebar" Margin="0 8 0 0" />
120-
</StackPanel>
121-
</Border>
122-
</UniformGrid>
131+
<StackPanel>
132+
<Label Style="{StaticResource FormLabel}">Start-up</Label>
133+
134+
<TextBlock Style="{StaticResource DataHeader}" Text="Initial screen" Margin="0 0 0 6" />
135+
<ComboBox
136+
SelectedValuePath="Tag"
137+
SelectedValue="{Binding DefaultScreen.CurrentValue}">
138+
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Dashboard}">Tools dashboard</ComboBoxItem>
139+
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Packages}">Packages</ComboBoxItem>
140+
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Volumes}">Volumes</ComboBoxItem>
141+
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Events}">Event viewer</ComboBoxItem>
142+
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.System}">System state</ComboBoxItem>
143+
</ComboBox>
144+
145+
<TextBlock Text="Release notes" Style="{StaticResource DataHeader}" Margin="0 16 0 6" />
146+
<CheckBox IsChecked="{Binding ShowReleaseNotes.CurrentValue}" Content="Show Release Notes after each update of MSIX Hero" />
147+
148+
<Label Style="{StaticResource FormLabel}" Margin="0 20 0 6">Prompts</Label>
149+
150+
<CheckBox IsChecked="{Binding ConfirmDeletion.CurrentValue}" Content="Confirm removal of items" />
151+
</StackPanel>
123152
</ScrollViewer>
124153
</TabItem>
125154
<TabItem Header="Signing">
@@ -261,36 +290,40 @@
261290
<DataTemplate DataType="{x:Type tools:ToolViewModel}">
262291
<DockPanel>
263292
<Image x:Name="PART_Image" Width="24" Height="24"
264-
Stretch="UniformToFill"
265-
SnapsToDevicePixels="True"
266-
UseLayoutRounding="True"
267-
VerticalAlignment="Center"
268-
Margin="0 0 6 0">
293+
Stretch="UniformToFill"
294+
SnapsToDevicePixels="True"
295+
UseLayoutRounding="True"
296+
VerticalAlignment="Center"
297+
Margin="0 0 6 0">
269298
<Image.Source>
270299
<Binding Path="Image" />
271300
</Image.Source>
272301
</Image>
273302

274303
<Viewbox
275-
Visibility="Collapsed"
276-
Width="24"
277-
Height="24"
278-
x:Name="PART_ImageFallback"
279-
SnapsToDevicePixels="True"
280-
UseLayoutRounding="True"
281-
VerticalAlignment="Center"
282-
Margin="0 0 6 0">
304+
Visibility="Collapsed"
305+
Width="24"
306+
Height="24"
307+
x:Name="PART_ImageFallback"
308+
SnapsToDevicePixels="True"
309+
UseLayoutRounding="True"
310+
VerticalAlignment="Center"
311+
Margin="0 0 6 0">
283312
<Path Data="{StaticResource VectorGear}" Width="32" Height="32" Fill="{StaticResource Otor.MsixHero.Brushes.Accent}" />
284313
</Viewbox>
285314

286315
<Border ToolTip="{Binding ValidationMessage}" ToolTipService.Placement="Bottom"
287-
ToolTipService.HasDropShadow="False" ToolTipService.InitialShowDelay="50"
288-
ToolTipService.ShowDuration="10000"
289-
Margin="6 -4 0 -4" Width="24" Height="24"
290-
Background="Transparent" VerticalAlignment="Center" DockPanel.Dock="Right" Visibility="Collapsed" x:Name="PART_Error">
291-
<Viewbox VerticalAlignment="Center" HorizontalAlignment="Center" Width="24" Height="24">
292-
<Path Data="{StaticResource VectorError}" Width="32" Height="32" Fill="IndianRed" />
293-
</Viewbox>
316+
ToolTipService.HasDropShadow="False" ToolTipService.InitialShowDelay="50"
317+
ToolTipService.ShowDuration="10000"
318+
Margin="6 -4 0 -4" Width="24" Height="24"
319+
Background="Transparent" VerticalAlignment="Center" DockPanel.Dock="Right" Visibility="Collapsed" x:Name="PART_Error">
320+
321+
<Border
322+
VerticalAlignment="Center"
323+
Margin="0 0 0 0"
324+
CornerRadius="14" Width="14" Height="14" Background="IndianRed" HorizontalAlignment="Right">
325+
<TextBlock Text="!" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="10" LineHeight="10" LineStackingStrategy="BlockLineHeight" FontWeight="Bold" Foreground="White" />
326+
</Border>
294327
</Border>
295328

296329
<TextBlock Text="{Binding Name.CurrentValue}" VerticalAlignment="Center" Margin="0" />
@@ -418,45 +451,20 @@
418451
</ScrollViewer>
419452
</Grid>
420453
</TabItem>
421-
<TabItem Header="UI">
422-
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled">
423-
<StackPanel>
424-
<Label Margin="0 0 0 6" Style="{StaticResource FormLabel}">Start-up</Label>
425-
426-
<TextBlock Style="{StaticResource DataHeader}" Text="Initial screen" Margin="0 0 0 6" />
427-
<ComboBox
428-
SelectedValuePath="Tag"
429-
SelectedValue="{Binding DefaultScreen.CurrentValue}">
430-
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Dashboard}">Tools dashboard</ComboBoxItem>
431-
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Packages}">Packages</ComboBoxItem>
432-
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Volumes}">Volumes</ComboBoxItem>
433-
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.Events}">Event viewer</ComboBoxItem>
434-
<ComboBoxItem Tag="{x:Static configuration:DefaultScreen.System}">System state</ComboBoxItem>
435-
</ComboBox>
436-
437-
<TextBlock Text="Release notes" Style="{StaticResource DataHeader}" Margin="0 16 0 6" />
438-
<CheckBox IsChecked="{Binding ShowReleaseNotes.CurrentValue}" Content="Show Release Notes after each update of MSIX Hero" />
439-
440-
<Label Style="{StaticResource FormLabel}" Margin="0 20 0 6">Prompts</Label>
441-
442-
<CheckBox IsChecked="{Binding ConfirmDeletion.CurrentValue}" Content="Confirm removal of items" />
443-
</StackPanel>
444-
</ScrollViewer>
445-
</TabItem>
446454
<TabItem Header="Other">
447455
<b:Interaction.Behaviors>
448456
<validation:ValidationBehavior ValidatedChangeable="{Binding TabOther}" />
449457
</b:Interaction.Behaviors>
450458
<StackPanel>
451-
<Label Margin="0 0 0 6" Content="Certificates" Style="{StaticResource FormLabel}" />
459+
<Label Content="Certificates" Style="{StaticResource FormLabel}" />
452460

453461
<TextBlock Text="Default folder where certificates are extracted" Style="{StaticResource DataHeader}" Margin="0 0 0 6" />
454462
<DockPanel Margin="0 0 0 16">
455463
<Button DockPanel.Dock="Right" Content="..." Command="{Binding CertificateOutputPath.Browse}" Margin="4 0 0 0" />
456464
<TextBox Text="{Binding CertificateOutputPath.CurrentValue, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" />
457465
</DockPanel>
458466

459-
<Label Margin="0 0 0 6" Content="Packing" Style="{StaticResource FormLabel}" />
467+
<Label Content="Packing" Style="{StaticResource FormLabel}" />
460468
<CheckBox IsChecked="{Binding PackerSignByDefault.CurrentValue}" Margin="0 0 0 16">
461469
<TextBlock Text="Sign packages after packing" TextWrapping="Wrap" />
462470
</CheckBox>

src/Otor.MsixHero.App/Modules/Main/Sidebar/Views/SidebarView.xaml.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@ public SidebarView(IBusyManager busyManager)
3636

3737
private void OnBusyManagerStatusChanged(object sender, IBusyStatusChange e)
3838
{
39-
if (Application.Current.CheckAccess())
39+
if (Application.Current == null)
40+
{
41+
this.IsEnabled = !e.IsBusy;
42+
}
43+
else if (Application.Current.CheckAccess())
4044
{
4145
this.IsEnabled = !e.IsBusy;
4246
}

src/Otor.MsixHero.App/Themes/Changables.xaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,22 @@
226226
<Grid Background="White">
227227

228228
<DockPanel>
229-
<Border Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Dialog.HasError, Converter={StaticResource BooleanToVisibilityConverter}}" Background="#22FF0000" Padding="8" DockPanel.Dock="Bottom">
230-
<TextBlock Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Dialog.Error}" VerticalAlignment="Center" />
229+
<Border Visibility="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Dialog.HasError, Converter={StaticResource BooleanToVisibilityConverter}}" Background="#FFE39E" Padding="8" DockPanel.Dock="Bottom">
230+
231+
<DockPanel>
232+
<Border
233+
DockPanel.Dock="Left"
234+
VerticalAlignment="Center"
235+
Margin="0 0 8 0"
236+
CornerRadius="14" Width="14" Height="14" Background="IndianRed" HorizontalAlignment="Right">
237+
<TextBlock Text="!" VerticalAlignment="Center" HorizontalAlignment="Center" FontSize="10" LineHeight="10" LineStackingStrategy="BlockLineHeight" FontWeight="Bold" Foreground="White" />
238+
</Border>
239+
240+
<TextBlock
241+
VerticalAlignment="Center"
242+
DockPanel.Dock="Right"
243+
Text="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Dialog.Error}" />
244+
</DockPanel>
231245
</Border>
232246

233247
<ContentPresenter

src/Otor.MsixHero.App/Themes/Forms.xaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
<Trigger Property="IsReadOnly" Value="True">
1717
<Setter Property="Background" Value="#eeeeee" />
1818
</Trigger>
19+
<Trigger Property="Validation.HasError" Value="True">
20+
<Setter Property="Background" Value="#FFEEC6" />
21+
</Trigger>
1922
</Style.Triggers>
2023
</Style>
2124

@@ -25,6 +28,11 @@
2528
<Setter Property="BorderThickness" Value="2" />
2629
<Setter Property="VerticalContentAlignment" Value="Center" />
2730
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationControlTemplate}" />
31+
<Style.Triggers>
32+
<Trigger Property="Validation.HasError" Value="True">
33+
<Setter Property="Background" Value="#FFEEC6" />
34+
</Trigger>
35+
</Style.Triggers>
2836
</Style>
2937

3038
<Style TargetType="CheckBox" x:Key="{x:Type CheckBox}">
@@ -44,6 +52,11 @@
4452
<Setter Property="BorderThickness" Value="2" />
4553
<Setter Property="VerticalContentAlignment" Value="Center" />
4654
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationControlTemplate}" />
55+
<Style.Triggers>
56+
<Trigger Property="Validation.HasError" Value="True">
57+
<Setter Property="Background" Value="#FFEEC6" />
58+
</Trigger>
59+
</Style.Triggers>
4760
</Style>
4861

4962
<Style TargetType="ComboBox" x:Key="{x:Type ComboBox}">
@@ -52,6 +65,11 @@
5265
<Setter Property="BorderThickness" Value="2" />
5366
<Setter Property="VerticalContentAlignment" Value="Center" />
5467
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource ValidationControlTemplate}" />
68+
<Style.Triggers>
69+
<Trigger Property="Validation.HasError" Value="True">
70+
<Setter Property="Background" Value="#FFEEC6" />
71+
</Trigger>
72+
</Style.Triggers>
5573
</Style>
5674

5775
<Style TargetType="TextBox" x:Key="DataValueTextBlock" BasedOn="{StaticResource TextBlock}">

0 commit comments

Comments
 (0)