Skip to content

Commit

Permalink
UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
niels9001 committed Nov 8, 2020
1 parent 14f905d commit aafab46
Show file tree
Hide file tree
Showing 12 changed files with 78 additions and 6 deletions.
36 changes: 36 additions & 0 deletions src/modules/imageresizer/ui/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions src/modules/imageresizer/ui/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,9 @@
<data name="Copyright" xml:space="preserve">
<value>© 2020 Brice Lambson. All rights reserved.</value>
</data>
<data name="Height" xml:space="preserve">
<value>Height</value>
</data>
<data name="ImageResizer" xml:space="preserve">
<value>Image Resizer</value>
</data>
Expand Down Expand Up @@ -312,6 +315,9 @@
<data name="Resize_Tooltip" xml:space="preserve">
<value>Resize pictures</value>
</data>
<data name="Resize_Type" xml:space="preserve">
<value>Resize type</value>
</data>
<data name="Results_Close" xml:space="preserve">
<value>Close</value>
</data>
Expand Down Expand Up @@ -342,10 +348,16 @@
<data name="TiffCompressOption_Zip" xml:space="preserve">
<value>Zip</value>
</data>
<data name="Unit" xml:space="preserve">
<value>Unit</value>
</data>
<data name="ValueMustBeBetween" xml:space="preserve">
<value>Value must be between '{0}' and '{1}'.</value>
</data>
<data name="Version" xml:space="preserve">
<value>Version</value>
</data>
<data name="Width" xml:space="preserve">
<value>Width</value>
</data>
</root>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/Dark.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF999999" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/HighContrast1.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FFffff00" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF00ff00" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/HighContrast2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FF00ff00" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FFc0c0c0" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/HighContrastBlack.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FFffffff" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF1aebff" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/HighContrastWhite.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF7d7d7d" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
1 change: 1 addition & 0 deletions src/modules/imageresizer/ui/Themes/Light.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@
<SolidColorBrush x:Key="PrimaryBackgroundBrush" Color="#FFFFFFFF" />
<SolidColorBrush x:Key="PrimaryForegroundBrush" Color="#FF000000" />
<SolidColorBrush x:Key="SecondaryForegroundBrush" Color="#FF7d7d7d" />
<SolidColorBrush x:Key="PrimaryBorderBrush" Color="Transparent"/>
</ResourceDictionary>
8 changes: 7 additions & 1 deletion src/modules/imageresizer/ui/Views/AdvancedWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
xmlns:p="clr-namespace:ImageResizer.Properties"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:ui="http://schemas.modernwpf.com/2019"
MinWidth="390"
MinWidth="560"
MinHeight="340"
ui:WindowHelper.UseModernWindowStyle="True"
ui:TitleBar.IsIconVisible="True"
Expand Down Expand Up @@ -65,6 +65,7 @@
<ComboBox Grid.Column="1"
Margin="8,0,0,0"
ItemsSource="{Binding Source={StaticResource ResizeFitValues}}"
AutomationProperties.Name="{x:Static p:Resources.Resize_Type}"
SelectedItem="{Binding Fit}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type m:ResizeFit}">
Expand All @@ -76,6 +77,7 @@
Width="56"
MaxWidth="56"
TextWrapping="Wrap"
AutomationProperties.Name="{x:Static p:Resources.Width}"
Margin="8,0,0,0">
<TextBox.Text>
<Binding Converter="{StaticResource AutoDoubleConverter}"
Expand All @@ -96,6 +98,7 @@
Width="56"
MaxWidth="56"
TextWrapping="Wrap"
AutomationProperties.Name="{x:Static p:Resources.Height}"
Margin="8,0,0,0"
Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}">
<TextBox.Text>
Expand All @@ -111,6 +114,7 @@
<ComboBox Grid.Column="5"
Margin="8,0,0,0"
ItemsSource="{Binding Source={StaticResource ResizeUnitValues}}"
AutomationProperties.Name="{x:Static p:Resources.Unit}"
SelectedItem="{Binding Unit}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type m:ResizeUnit}">
Expand Down Expand Up @@ -262,6 +266,8 @@
</TabControl>
<Border Grid.Row="1"
Margin="0,24,0,0"
BorderBrush="{DynamicResource PrimaryBorderBrush}"
BorderThickness="0,1,0,0"
Background="{DynamicResource SecondaryBackgroundBrush}"
Padding="12">

Expand Down
12 changes: 9 additions & 3 deletions src/modules/imageresizer/ui/Views/InputPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
Content="{x:Static p:Resources.Input_Content}"
Target="{Binding ElementName=_selectedSizeListBox}"/>

<ListBox Margin="12,12,12,0"
<ListBox Margin="12,24,12,0"
BorderThickness="0"
Background="Transparent"
AutomationProperties.Name="Sizes listbox"
Expand Down Expand Up @@ -87,6 +87,7 @@
<ComboBox Margin="8,0,0,0"
ItemsSource="{Binding Source={StaticResource ResizeFitValues}}"
Style="{StaticResource DisabledWhenUnselectedComboBoxStyle}"
AutomationProperties.Name="{x:Static p:Resources.Resize_Type}"
SelectedItem="{Binding Fit}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type m:ResizeFit}">
Expand All @@ -97,6 +98,7 @@
<TextBox Width="56"
TextWrapping="Wrap"
Style="{StaticResource DisabledWhenUnselectedTextBoxStyle}"
AutomationProperties.Name="{x:Static p:Resources.Width}"
Margin="8,0,0,0">
<TextBox.Text>
<Binding Converter="{StaticResource AutoDoubleConverter}"
Expand All @@ -115,6 +117,7 @@
<TextBox Width="56"
Style="{StaticResource DisabledWhenUnselectedTextBoxStyle}"
TextWrapping="Wrap"
AutomationProperties.Name="{x:Static p:Resources.Height}"
Visibility="{Binding ShowHeight,Converter={StaticResource BoolValueConverter}}">
<TextBox.Text>
<Binding Converter="{StaticResource AutoDoubleConverter}"
Expand All @@ -129,6 +132,7 @@
<ComboBox Margin="8,0,0,0"
ItemsSource="{Binding Source={StaticResource ResizeUnitValues}}"
Style="{StaticResource DisabledWhenUnselectedComboBoxStyle}"
AutomationProperties.Name="{x:Static p:Resources.Unit}"
SelectedItem="{Binding Unit}">
<ComboBox.ItemTemplate>
<DataTemplate DataType="{x:Type m:ResizeUnit}">
Expand All @@ -141,7 +145,7 @@
</ListBox.Resources>
</ListBox>

<CheckBox Margin="12,24,12,0"
<CheckBox Margin="12,36,12,0"
Content="{x:Static p:Resources.Input_ShrinkOnly}"
IsChecked="{Binding Settings.ShrinkOnly}"/>
<!-- TODO: This option doesn't make much sense when resizing into a directory. We should swap it for an option
Expand All @@ -156,6 +160,8 @@

<Border Margin="0,24,0,0"
Background="{DynamicResource SecondaryBackgroundBrush}"
BorderBrush="{DynamicResource PrimaryBorderBrush}"
BorderThickness="0,1,0,0"
Padding="12">
<Grid>
<Grid.ColumnDefinitions>
Expand All @@ -168,7 +174,7 @@
FontFamily="Segoe MDL2 Assets"
Style="{StaticResource DefaultButtonStyle}"
FontSize="16"
Margin="-10,0,0,0"
Margin="-6,0,0,0"
AutomationProperties.Name="{x:Static p:Resources.Input_ShowAdvanced}"
ToolTip="{x:Static p:Resources.Input_ShowAdvanced}"
Background="Transparent"
Expand Down
7 changes: 6 additions & 1 deletion src/modules/imageresizer/ui/Views/ProgressPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@
<StackPanel>
<TextBlock Margin="12,12,12,0"
FontSize="16"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{x:Static p:Resources.Progress_MainInstruction}"/>
<TextBlock Margin="12,12,12,0" Text="{Binding TimeRemaining,Converter={StaticResource TimeRemainingConverter}}"/>
<TextBlock Margin="12,12,12,0"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{Binding TimeRemaining,Converter={StaticResource TimeRemainingConverter}}"/>
<ProgressBar Height="16"
Margin="12,12,12,0"
Value="{Binding Progress}"
Maximum="1"/>
<Border Margin="0,12,0,0"
Background="{DynamicResource SecondaryBackgroundBrush}"
BorderBrush="{DynamicResource PrimaryBorderBrush}"
BorderThickness="0,1,0,0"
Padding="12,12">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
<Button MinWidth="76"
Expand Down
3 changes: 2 additions & 1 deletion src/modules/imageresizer/ui/Views/ResultsPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<StackPanel>
<TextBlock Margin="12,12,12,0"
FontSize="16"
Foreground="{DynamicResource PrimaryForegroundBrush}"
Text="{x:Static p:Resources.Results_MainInstruction}"/>
<ScrollViewer MaxWidth="363"
MaxHeight="350"
Expand All @@ -28,7 +29,7 @@
</ScrollViewer>
<Border Margin="0,12,0,0"
Background="{DynamicResource SecondaryBackgroundBrush}"
BorderBrush="{DynamicResource {x:Static SystemColors.ControlLightBrushKey}}"
BorderBrush="{DynamicResource PrimaryBorderBrush}"
BorderThickness="0,1,0,0"
Padding="12,12">
<StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
Expand Down

1 comment on commit aafab46

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New misspellings found, please review:

  • modernwpf
To accept these changes, run the following commands
perl -e '
my @expect_files=qw('".github/actions/spell-check/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"aae abkseg actionkeyword aeroglass alfredtheme APPDATA APPID appxpackage AProduct baf bakudies basedir bfa bretan BYCOMMAND calculatorpinyindb cbegin cend cheatsheet Combobox COUNTSLABELFMT ctx deletefilefolder Deserialized desktoppreviewhandler desktopshortcutinstalled dicts dirn dropdownstypekey dropdowntypekey DString Dvs EBF Ecma ecmascript ei eig eigval eigvec ENTIREITEMNAME evt excmd executionengine EXPLR ftp Fx fxml GETDESKWALLPAPER GWL gwoyeu hanyu hglobal hicon Highcontrast hmon hyjiacan IAlphabet IExclusive iexplore IInstant IME IMonitor IMulti Indexerpinyindb Inlining isborderless Italiano jsonrpc KBHOOK KBM KListener KSeparator lastpos launcherpinyin Launcherpinyindb lbl lbx Linux LSHIFT MENUSTART nc NHotkey numberbox orphanedkey osdetection Pampalona pdk PERSISTEDDATA pimpl pinyindb Pipename Plist plistlib pls Pluginpinyindb Polski Portugu POWERTOYNAME Prepends PREVPANE progman Programpinyindb Progressbar reggedit remapkey remapkeyboard remapper remapshort Remoting reulst rgba rgn rk RPressed RStroked Rtc RWIN Scrollable scrollbar scrollviewer sessionending setings setwineventhook Shellpinyindb shortcutguide SHOWNA SHOWWINDOW Slovensk sni Srpski stefan strem stringstream subdir Subheader superfancyzones SYSKEYDOWN systemcolors Tcp temppath thr Tls tmpnam tohex transaprency TRANSPARENTGRADIENT TResult TZone uac uapmanifestschema uk Unsubscribe USERPROFILE VDId VGr VIRTUALDESKTOPCHANGE virtualized Virtualizing vkcode vstest Walkerpinyindb wangyiyun wca wcschr wcsrchr Webcam websearch wexfs winapi winlogo winr WINTAB WORKERW wsmatch wtmpnam Xecutor xyzpreviewhandler yinle yinyue yyy ZConfig "');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
  if ($ARGV ne $old_argv) { maybe_unlink($previous); $previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT, ">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
  next if /^($re)(?:$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spell-check/expect.txt";
open FILE, q{<}, $new_expect_file; chomp(my @words = <FILE>); close FILE;
my @add=qw('"Actionkeyword appdata appid combobox Ctx deserialized ebf Entireitemname explr fx gwl HGLOBAL HICON IEXPLORE ime kbm lshift modernwpf pipename prevpane Progman Remapper Rgn rwin scrollable showwindow Subdir syskeydown UAC unsubscribe userprofile Wca webcam WINAPI "');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a) cmp lc($b)} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE "$word\n" if $word =~ /\w/; };
close FILE;'
git add .github/actions/spell-check || echo '... you want to ensure .github/actions/spell-check/expect.txt is added to your repository...'

Please sign in to comment.