Skip to content

Commit

Permalink
#114 Update langauge selection and settings window
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben2776 committed Jul 25, 2023
1 parent 77054c5 commit 84a9d48
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
26 changes: 24 additions & 2 deletions src/PicView/Translations/LoadLanguage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,38 @@ internal static void DetermineLanguage(bool isFromCulture)
switch (isoLanguage)
{
case "da":
case "da-DK":
source = new Uri(@"/PicView;component/Translations/da.xaml", UriKind.Relative);
break;

case "de":
case "de-DE":
case "de-CH":
case "de-AT":
case "de-LU":
case "de-LI":
source = new Uri(@"/PicView;component/Translations/de.xaml", UriKind.Relative);
break;

case "es":
case "es-ES":
case "es-GT":
case "es-CR":
case "es-MX":
case "es-PA":
case "es-DO":
case "es-VE":
case "es-CO":
case "es-PE":
case "es-AR":
case "es-CL":
case "es-EC":
case "es-UY":
case "es-PY":
case "es-BO":
case "es-HN":
case "es-NI":
case "es-PR":
source = new Uri(@"/PicView;component/Translations/es.xaml", UriKind.Relative);
break;

Expand All @@ -34,11 +58,9 @@ internal static void DetermineLanguage(bool isFromCulture)

case "zh":
case "zh-CN":
case "zh_CN":
source = new Uri(@"/PicView;component/Translations/zh-CN.xaml", UriKind.Relative);
break;

case "zh_TW":
case "zh-TW":
source = new Uri(@"/PicView;component/Translations/zh-TW.xaml", UriKind.Relative);
break;
Expand Down
13 changes: 8 additions & 5 deletions src/PicView/Views/Windows/SettingsWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:misc="clr-namespace:PicView.Views.UserControls.Misc"
Width="325"
MinWidth="325"
MaxWidth="375"
AllowsTransparency="True"
BorderBrush="{StaticResource BorderBrush}"
BorderThickness="1"
Expand Down Expand Up @@ -156,7 +157,7 @@
TextWrapping="Wrap" />
</TabItem.Header>

<ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="10,10,10,10">

<Label
Expand Down Expand Up @@ -297,6 +298,7 @@

<RadioButton
x:Name="CtrlZoom"
Width="279"
Margin="5,0,6,5"
d:IsChecked="True"
BorderThickness="0"
Expand All @@ -306,7 +308,7 @@
<SolidColorBrush x:Name="CtrlZoomText" Color="{StaticResource MainColor}" />
</RadioButton.Foreground>
<TextBlock
Width="275"
Width="279"
Focusable="False"
FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
Text="{StaticResource CtrlToZoom}"
Expand All @@ -315,14 +317,15 @@

<RadioButton
x:Name="ScrollZoom"
Width="279"
Margin="5,0,6,5"
Focusable="False"
FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto">
<RadioButton.Foreground>
<SolidColorBrush x:Name="ScrollZoomText" Color="{StaticResource MainColor}" />
</RadioButton.Foreground>
<TextBlock
Width="275"
Width="279"
Focusable="False"
FontFamily="/PicView;component/Themes/Resources/fonts/#Roboto"
Text="{StaticResource ScrollToZoom}"
Expand Down Expand Up @@ -486,7 +489,7 @@
TextWrapping="Wrap" />
</TabItem.Header>

<ScrollViewer VerticalScrollBarVisibility="Auto">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
<StackPanel Margin="10">

<Label
Expand Down

0 comments on commit 84a9d48

Please sign in to comment.