Procházet zdrojové kódy

Some style changes and scroll behaviour

flabbet před 3 roky
rodič
revize
54335a52f9

+ 2 - 2
PixiEditor/Styles/ComboBoxDarkStyle.xaml

@@ -267,10 +267,10 @@
                     </Border>
                     </Border>
                     <ControlTemplate.Triggers>
                     <ControlTemplate.Triggers>
                         <Trigger Property="IsHighlighted" Value="True">
                         <Trigger Property="IsHighlighted" Value="True">
-                            <Setter Property="Background" TargetName="Bd" Value="Gray" />
+                            <Setter Property="Background" TargetName="Bd" Value="{StaticResource MainColor}" />
                         </Trigger>
                         </Trigger>
                         <Trigger Property="IsEnabled" Value="False">
                         <Trigger Property="IsEnabled" Value="False">
-                            <Setter Property="Foreground" Value="Gray" />
+                            <Setter Property="Foreground" Value="{StaticResource MainColor}" />
                         </Trigger>
                         </Trigger>
                     </ControlTemplate.Triggers>
                     </ControlTemplate.Triggers>
                 </ControlTemplate>
                 </ControlTemplate>

+ 1 - 0
PixiEditor/Styles/ThemeColors.xaml

@@ -2,6 +2,7 @@
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
 
 
     <SolidColorBrush x:Key="PixiRed" Color="#e3002d" />
     <SolidColorBrush x:Key="PixiRed" Color="#e3002d" />
+    <SolidColorBrush x:Key="AccentRed" Color="#B00022"/>
     <SolidColorBrush x:Key="MainColor" Color="#2D2D30" />
     <SolidColorBrush x:Key="MainColor" Color="#2D2D30" />
     <SolidColorBrush x:Key="AccentColor" Color="#252525" />
     <SolidColorBrush x:Key="AccentColor" Color="#252525" />
     <SolidColorBrush x:Key="DarkerAccentColor" Color="#202020" />
     <SolidColorBrush x:Key="DarkerAccentColor" Color="#202020" />

+ 5 - 3
PixiEditor/Views/Dialogs/LospecPalettesBrowser.xaml

@@ -24,7 +24,7 @@
     <Grid Background="{StaticResource AccentColor}" FocusVisualStyle="{x:Null}">
     <Grid Background="{StaticResource AccentColor}" FocusVisualStyle="{x:Null}">
         <Grid.RowDefinitions>
         <Grid.RowDefinitions>
             <RowDefinition Height="35" />
             <RowDefinition Height="35" />
-            <RowDefinition Height="50"/>
+            <RowDefinition Height="55"/>
             <RowDefinition Height="1*"/>
             <RowDefinition Height="1*"/>
             <RowDefinition Height="20"/>
             <RowDefinition Height="20"/>
         </Grid.RowDefinitions>
         </Grid.RowDefinitions>
@@ -37,19 +37,21 @@
         <StackPanel Background="{StaticResource MainColor}" Orientation="Horizontal" Grid.Row="1">
         <StackPanel Background="{StaticResource MainColor}" Orientation="Horizontal" Grid.Row="1">
             <StackPanel Margin="10" Orientation="Horizontal" VerticalAlignment="Center">
             <StackPanel Margin="10" Orientation="Horizontal" VerticalAlignment="Center">
                 <Label Content="Sort by:" Style="{StaticResource BaseLabel}" VerticalAlignment="Center" FontSize="16"/>
                 <Label Content="Sort by:" Style="{StaticResource BaseLabel}" VerticalAlignment="Center" FontSize="16"/>
-                <ComboBox Name="sortingComboBox" FontSize="16" SelectionChanged="SortingComboBox_SelectionChanged">
+                <ComboBox Name="sortingComboBox" FontSize="16" VerticalAlignment="Center" SelectionChanged="SortingComboBox_SelectionChanged">
                     <ComboBoxItem IsSelected="True">Default</ComboBoxItem>
                     <ComboBoxItem IsSelected="True">Default</ComboBoxItem>
                     <ComboBoxItem>Alphabetical</ComboBoxItem>
                     <ComboBoxItem>Alphabetical</ComboBoxItem>
                     <ComboBoxItem>Downloads</ComboBoxItem>
                     <ComboBoxItem>Downloads</ComboBoxItem>
                     <ComboBoxItem>Newest</ComboBoxItem>
                     <ComboBoxItem>Newest</ComboBoxItem>
                 </ComboBox>
                 </ComboBox>
+                <Label Margin="10 0 0 0" Content="Tags:" Style="{StaticResource BaseLabel}" VerticalAlignment="Center" FontSize="16"/>
+                <TextBox FontSize="16" VerticalAlignment="Center" Style="{StaticResource DarkTextBoxStyle}" Width="150"/>
             </StackPanel>
             </StackPanel>
         </StackPanel>
         </StackPanel>
         <Grid Grid.Row="2" Margin="10">
         <Grid Grid.Row="2" Margin="10">
             <TextBlock Text="Couldn't fetch palettes" Foreground="White" FontSize="20" HorizontalAlignment="Center" 
             <TextBlock Text="Couldn't fetch palettes" Foreground="White" FontSize="20" HorizontalAlignment="Center" 
                        VerticalAlignment="Center" Visibility="{Binding ElementName=itemsControl, 
                        VerticalAlignment="Center" Visibility="{Binding ElementName=itemsControl, 
                 Path=Visibility, Converter={converters:OppositeVisibilityConverter}}"/>
                 Path=Visibility, Converter={converters:OppositeVisibilityConverter}}"/>
-            <ScrollViewer Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" ScrollChanged="ScrollViewer_ScrollChanged">
+            <ScrollViewer Name="scrollViewer" Margin="5" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" ScrollChanged="ScrollViewer_ScrollChanged">
                 <ItemsControl Name="itemsControl" ItemsSource="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.Palettes}" 
                 <ItemsControl Name="itemsControl" ItemsSource="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.Palettes}" 
                           Visibility="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.FetchedCorrectly,
                           Visibility="{Binding ElementName=lospecPalettesBrowser, Path=PaletteList.FetchedCorrectly,
                 Converter={StaticResource BoolToVisibilityConverter}}">
                 Converter={StaticResource BoolToVisibilityConverter}}">

+ 1 - 0
PixiEditor/Views/Dialogs/LospecPalettesBrowser.xaml.cs

@@ -115,6 +115,7 @@ namespace PixiEditor.Views.Dialogs
             {
             {
                 SortingType = value;
                 SortingType = value;
                 await UpdatePaletteList(true);
                 await UpdatePaletteList(true);
+                scrollViewer.ScrollToHome();
             }
             }
         }
         }
     }
     }