Browse Source

Added layer previews and document previews WIP

flabbet 4 years ago
parent
commit
d72f1f48d7

+ 11 - 11
PixiEditor/Styles/AvalonDock/DarkBrushs.xaml

@@ -8,7 +8,7 @@
 	</ResourceDictionary.MergedDictionaries>
 	</ResourceDictionary.MergedDictionaries>
 
 
 	<!--  Accent Keys  -->
 	<!--  Accent Keys  -->
-    <Color x:Key="{x:Static reskeys:ResourceKeys.ControlAccentColorKey}">#638DCA</Color>
+    <Color x:Key="{x:Static reskeys:ResourceKeys.ControlAccentColorKey}">#234099</Color>
 
 
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ControlAccentBrushKey}"
 		x:Key="{x:Static reskeys:ResourceKeys.ControlAccentBrushKey}"
@@ -74,16 +74,16 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredGlyph}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonHoveredGlyph}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<!--  AccentColor  -->
 	<!--  AccentColor  -->
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBorder}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedBorder}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedGlyph}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellOverflowButtonPressedGlyph}"
 		options:Freeze="true"
 		options:Freeze="true"
@@ -94,7 +94,7 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 
 
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabSelectedActiveText}"
@@ -136,12 +136,12 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<!--  AccentColor  -->
 	<!--  AccentColor  -->
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredBorder}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}"
 		x:Key="{x:Static reskeys:ResourceKeys.DocumentWellTabButtonSelectedActiveHoveredGlyph}"
 		options:Freeze="true"
 		options:Freeze="true"
@@ -226,7 +226,7 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveGrip}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowCaptionActiveGrip}"
 		options:Freeze="true"
 		options:Freeze="true"
@@ -323,7 +323,7 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveText}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedActiveText}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
@@ -332,7 +332,7 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveText}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabSelectedInactiveText}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.ToolWindowTabUnselectedBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
@@ -385,7 +385,7 @@
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedBackground}"
 		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedBackground}"
 		options:Freeze="true"
 		options:Freeze="true"
-		Color="#638DCA" />
+		Color="#234099" />
 	<SolidColorBrush
 	<SolidColorBrush
 		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedText}"
 		x:Key="{x:Static reskeys:ResourceKeys.NavigatorWindowSelectedText}"
 		options:Freeze="true"
 		options:Freeze="true"

+ 7 - 5
PixiEditor/Styles/AvalonDock/Themes/Generic.xaml

@@ -306,25 +306,27 @@
 					<Setter Property="BorderBrush" Value="Transparent" />
 					<Setter Property="BorderBrush" Value="Transparent" />
 					<Setter Property="ToolTip" Value="{Binding ToolTip}" />
 					<Setter Property="ToolTip" Value="{Binding ToolTip}" />
 					<Setter Property="Padding" Value="6,1" />
 					<Setter Property="Padding" Value="6,1" />
-					<Setter Property="Margin" Value="0" />
-					<Setter Property="Template">
+                    <Setter Property="Margin" Value="0" />
+                    <Setter Property="Template">
 						<Setter.Value>
 						<Setter.Value>
 							<ControlTemplate TargetType="{x:Type TabItem}">
 							<ControlTemplate TargetType="{x:Type TabItem}">
                                 <Grid SnapsToDevicePixels="true">
                                 <Grid SnapsToDevicePixels="true">
                                     <Border
                                     <Border
 										x:Name="Bd"
 										x:Name="Bd"
 										Background="{TemplateBinding Background}"
 										Background="{TemplateBinding Background}"
-                                        CornerRadius="2.5 2.5 0 0"
 										BorderBrush="{Binding Background, RelativeSource={RelativeSource Self}}"
 										BorderBrush="{Binding Background, RelativeSource={RelativeSource Self}}"
 										BorderThickness="0,0,0,2" />
 										BorderThickness="0,0,0,2" />
-									<ContentPresenter
+                                    <StackPanel Orientation="Horizontal">
+                                        <Image Margin="5" Width="50" Stretch="UniformToFill" Height="40" Source="{Binding }"/>
+                                    <ContentPresenter
 										x:Name="Content"
 										x:Name="Content"
 										HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
 										HorizontalAlignment="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
 										VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
 										VerticalAlignment="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorType={x:Type ItemsControl}}}"
 										ContentSource="Header"
 										ContentSource="Header"
 										RecognizesAccessKey="True"
 										RecognizesAccessKey="True"
 										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
 										SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
-								</Grid>
+                                    </StackPanel>
+                                </Grid>
 								<ControlTemplate.Triggers>
 								<ControlTemplate.Triggers>
 									<Trigger Property="Selector.IsSelected" Value="true">
 									<Trigger Property="Selector.IsSelected" Value="true">
 										<Setter Property="Panel.ZIndex" Value="1" />
 										<Setter Property="Panel.ZIndex" Value="1" />

+ 2 - 0
PixiEditor/Views/MainWindow.xaml

@@ -150,6 +150,8 @@
         </DockPanel>
         </DockPanel>
         <StackPanel Background="{StaticResource MainColor}" Orientation="Horizontal" Grid.ColumnSpan="3" Grid.Column="0"
         <StackPanel Background="{StaticResource MainColor}" Orientation="Horizontal" Grid.ColumnSpan="3" Grid.Column="0"
                      Grid.Row="1">
                      Grid.Row="1">
+            <Label Style="{StaticResource BaseLabel}" Margin="10,0,0,0" FontSize="12" VerticalAlignment="Center" Content="{Binding BitmapManager.SelectedTool.ToolName}"/>
+            <Label Style="{StaticResource BaseLabel}" Padding="0" FontSize="12" VerticalAlignment="Center" Content="tool"/>
             <ItemsControl ItemsSource="{Binding BitmapManager.SelectedTool.Toolbar.Settings}">
             <ItemsControl ItemsSource="{Binding BitmapManager.SelectedTool.Toolbar.Settings}">
                 <ItemsControl.ItemsPanel>
                 <ItemsControl.ItemsPanel>
                     <ItemsPanelTemplate>
                     <ItemsPanelTemplate>

+ 3 - 5
PixiEditor/Views/UserControls/LayerItem.xaml

@@ -30,13 +30,11 @@
             <CheckBox Style="{StaticResource ImageCheckBox}" VerticalAlignment="Center"
             <CheckBox Style="{StaticResource ImageCheckBox}" VerticalAlignment="Center"
                       IsThreeState="False" HorizontalAlignment="Center"
                       IsThreeState="False" HorizontalAlignment="Center"
                       IsChecked="{Binding Path=IsVisible, Mode=TwoWay}" Grid.Column="0" Height="16" />
                       IsChecked="{Binding Path=IsVisible, Mode=TwoWay}" Grid.Column="0" Height="16" />
-            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left" Margin="20,0,0,0">
-                <Grid Width="50" Height="20" Margin="0,0,20,0">
-                    <Image Source="{Binding PreviewImage,ElementName=uc}" Stretch="Uniform"
+            <StackPanel Orientation="Horizontal" Grid.Column="1" HorizontalAlignment="Left" Margin="5,0,0,0">
+                <Image Source="{Binding PreviewImage,ElementName=uc}" Stretch="Uniform" Width="50" Height="20" Margin="0,0,20,0"
                        RenderOptions.BitmapScalingMode="NearestNeighbor"/>
                        RenderOptions.BitmapScalingMode="NearestNeighbor"/>
-                </Grid>
                 <local:EditableTextBlock
                 <local:EditableTextBlock
-                    IsEditing="{Binding IsRenaming, ElementName=uc, Mode=TwoWay}" FontSize="16" 
+                    IsEditing="{Binding IsRenaming, ElementName=uc, Mode=TwoWay}" FontSize="16"
                     VerticalAlignment="Center"
                     VerticalAlignment="Center"
                     Text="{Binding LayerName, ElementName=uc, Mode=TwoWay}" />
                     Text="{Binding LayerName, ElementName=uc, Mode=TwoWay}" />
             </StackPanel>
             </StackPanel>