Browse Source

Updated setting name

Krzysztof Krysiński 2 years ago
parent
commit
d3bfd60aef

+ 1 - 1
src/PixiEditor/Data/Localization/Languages/en.json

@@ -576,7 +576,7 @@
   "PALETTE_BROWSER_BUY_TEXT": "Buy Supporter Pack and get 21 beautiful palettes!",
 
   "NEWS": "News",
-  "HIDE_NEWS_PANEL": "Hide News panel in startup window",
+  "DISABLE_NEWS_PANEL": "Disable News panel in startup window",
   "FAILED_FETCH_NEWS": "Failed to fetch news",
   
   "CROP_TO_SELECTION": "Crop to selection",

+ 4 - 4
src/PixiEditor/ViewModels/SubViewModels/UserPreferences/Settings/FileSettings.cs

@@ -47,11 +47,11 @@ internal class FileSettings : SettingsGroup
         set => RaiseAndUpdatePreference(ref maxOpenedRecently, value);
     }
 
-    private bool hideNewsPanel = GetPreference(PreferencesConstants.DisableNewsPanel, false);
+    private bool disableNewsPanel = GetPreference(PreferencesConstants.DisableNewsPanel, false);
 
-    public bool HideNewsPanel
+    public bool DisableNewsPanel
     {
-        get => hideNewsPanel;
-        set => RaiseAndUpdatePreference(ref hideNewsPanel, value);
+        get => disableNewsPanel;
+        set => RaiseAndUpdatePreference(ref disableNewsPanel, value, PreferencesConstants.DisableNewsPanel);
     }
 }

+ 2 - 2
src/PixiEditor/Views/Dialogs/SettingsWindow.xaml

@@ -116,8 +116,8 @@
                           IsChecked="{Binding SettingsSubViewModel.File.ShowStartupWindow}"/>
 
                 <CheckBox Margin="27 10"
-                          VerticalAlignment="Center" ui:Translator.Key="HIDE_NEWS_PANEL" d:Content="Hide news in startup window"
-                          IsChecked="{Binding SettingsSubViewModel.File.HideNewsPanel}"/>
+                          VerticalAlignment="Center" ui:Translator.Key="DISABLE_NEWS_PANEL" d:Content="Hide news in startup window"
+                          IsChecked="{Binding SettingsSubViewModel.File.DisableNewsPanel}"/>
 
                 <CheckBox Margin="27 0"
                           VerticalAlignment="Center" d:Content="Show image preview in taskbar" ui:Translator.Key="SHOW_IMAGE_PREVIEW_TASKBAR"

+ 6 - 4
src/PixiEditor/Views/UserControls/NewsFeed/NewsItem.xaml

@@ -8,6 +8,7 @@
              xmlns:xaml="clr-namespace:PixiEditor.Models.Commands.XAML"
              xmlns:converters="clr-namespace:PixiEditor.Helpers.Converters"
              xmlns:b="http://schemas.microsoft.com/xaml/behaviors"
+             xmlns:gl="clr-namespace:System.Globalization;assembly=System.Runtime"
              mc:Ignorable="d" Name="newsItem"
              d:DesignHeight="300" d:DesignWidth="300">
     <Border Background="{StaticResource MainColor}" CornerRadius="5">
@@ -16,7 +17,7 @@
                 <Border Background="White" Name="Mask" CornerRadius="8 8 0 0"/>
                 <StackPanel>
                     <Image Cursor="Hand" Margin="-1" Source="{Binding ElementName=newsItem, Path=News.CoverImageUrl}"
-                           MouseDown="CoverImageClicked"/>
+                           MouseDown="CoverImageClicked" Name="coverImage"/>
                     <StackPanel.OpacityMask>
                         <VisualBrush Visual="{Binding ElementName=Mask}" />
                     </StackPanel.OpacityMask>
@@ -40,12 +41,13 @@
             </StackPanel>
             <Grid>
                 <Border Visibility="{Binding ElementName=newsItem, Path=News.IsNew, Converter={converters:BoolToVisibilityConverter}}"
-                        Margin="0 2.5" Background="{StaticResource AccentRed}" HorizontalAlignment="Left"
-                        Padding="5 2.5" CornerRadius="0 5 0 0">
+                        Margin="2.5 2.5" Background="{StaticResource AccentRed}" HorizontalAlignment="Left"
+                        Padding="5 2.5" CornerRadius="5">
                     <TextBlock Text="New!" Foreground="White" FontSize="12" FontStyle="Italic"/>
                 </Border>
                 <TextBlock Margin="8 5" HorizontalAlignment="Right" FontSize="12" Foreground="LightGray"
-                           Text="{Binding ElementName=newsItem, Path=News.Date, StringFormat=d}"/>
+                           Text="{Binding ElementName=newsItem, Path=News.Date, StringFormat=d,
+                           ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}}"/>
             </Grid>
         </StackPanel>
     </Border>