Skip to content

Commit

Permalink
Make game background image use all window.
Browse files Browse the repository at this point in the history
Increased padding to sidebar and Top panel.
Changed background and foreground colors of items in sidebar and top panel.
  • Loading branch information
darklinkpower committed Apr 14, 2024
1 parent 22b25d1 commit 8745f64
Show file tree
Hide file tree
Showing 7 changed files with 93 additions and 32 deletions.
5 changes: 2 additions & 3 deletions source/Constants.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
<Color x:Key="TitleWindowCloseHoverColor">#e62e4c</Color>
<Color x:Key="ControlsBackgroundColor">#0Ffbfbfb</Color>

<Color x:Key="TopPanelItemBackgroundColor">#14f3f3f3</Color>
<Color x:Key="TopPanelItemHoverBackgroundColor">#e0646464</Color>
<Color x:Key="TopPanelItemBackgroundColor">Transparent</Color>
<Color x:Key="TopPanelItemHoverBackgroundColor">#14f3f3f3</Color>
<Color x:Key="TopPanelSearchBoxBackgroundColor">#14f3f3f3</Color>
<Color x:Key="TopPanelFilterToggleBackgroundColor">#14f3f3f3</Color>

Expand Down Expand Up @@ -290,5 +290,4 @@
<ImageBrush x:Key="WhiteNoiseBrush" ImageSource="{ThemeFile 'Images/white_noise.png'}" TileMode="Tile" Viewport="0,0,100,100" ViewportUnits="Absolute"
Opacity="1.0" popt:Freeze="True"/>
<BitmapImage x:Key="InnerGlowBitmap" UriSource="{ThemeFile 'Images/innerglow.png'}" popt:Freeze="True" CacheOption="OnLoad" />

</ResourceDictionary>
6 changes: 3 additions & 3 deletions source/CustomControls/SidebarItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Setter Property="Foreground" Value="{DynamicResource SidebarItemForegroundBrush}" />
<Setter Property="Background" Value="Transparent" />
<Setter Property="Background" Value="{DynamicResource TopPanelItemBackgroundBrush}" />
<Setter Property="FocusVisualStyle" Value="{x:Null}" />
<Setter Property="BorderThickness" Value="0,0,0,0" />
<Setter Property="Margin" Value="0,10,0,0" />
Expand Down Expand Up @@ -35,10 +35,10 @@
</Setter>
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Background" Value="{DynamicResource SidebarHoverBackgroundBrush}" />
<Setter Property="Background" Value="{DynamicResource TopPanelItemHoverBackgroundBrush}" />
</Trigger>
<DataTrigger Binding="{Binding Selected}" Value="True">
<Setter Property="Background" Value="{DynamicResource SidebarSelectedBackgroundBrush}" />
<Setter Property="Background" Value="{DynamicResource TopPanelItemHoverBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource SidebarItemSelectedForegroundBrush}" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
Expand Down
3 changes: 2 additions & 1 deletion source/CustomControls/TopPanelItem.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<Setter Property="Margin" Value="8,0,0,0" />
<Setter Property="Background" Value="{DynamicResource TopPanelItemBackgroundBrush}" />
<Setter Property="Focusable" Value="False" />
<Setter Property="Foreground" Value="{DynamicResource ButtonTextBrush}" />
<Setter Property="Foreground" Value="{DynamicResource SidebarItemForegroundBrush}" />
<Setter Property="VerticalContentAlignment" Value="Center" />
<Setter Property="HorizontalContentAlignment" Value="Center" />
<Setter Property="Padding" Value="6" />
Expand All @@ -30,6 +30,7 @@
</Trigger>
<Trigger Property="IsToggled" Value="True">
<Setter Property="Background" Value="{DynamicResource TopPanelItemHoverBackgroundBrush}" />
<Setter Property="Foreground" Value="{DynamicResource SidebarItemSelectedForegroundBrush}" />
</Trigger>
<MultiTrigger>
<MultiTrigger.Conditions>
Expand Down
54 changes: 40 additions & 14 deletions source/Views/Library.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
mc:Ignorable="d">

<Style TargetType="{x:Type Library}">
<Setter Property="Tag" Value="Library" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Library}">
Expand All @@ -18,9 +19,13 @@
<ColumnDefinition />
</Grid.ColumnDefinitions>
<FadeImage x:Name="PART_ImageBackground"
ImageDarkeningBrush="#666666"
Grid.Row="0" Grid.Column="0" Grid.RowSpan="2"
HorizontalAlignment="Center" VerticalAlignment="Top" />

<Border Grid.RowSpan="2" Visibility="{Binding ElementName=NoiseBorder, Path=Visibility}"
Background="{DynamicResource FadeBrushImage}" />

<Border x:Name="NoiseBorder" Grid.RowSpan="2" Grid.ColumnSpan="2"
Tag="{DynamicResource LibraryUseNoiseOpacityLayer}"
Background="{StaticResource DarkNoiseBrush}" IsHitTestVisible="False">
Expand All @@ -29,10 +34,10 @@
<Setter Property="Visibility" Value="Visible" />
<Setter Property="OpacityMask">
<Setter.Value>
<LinearGradientBrush StartPoint="0,0" EndPoint="0,1.0">
<LinearGradientBrush StartPoint="0,0" EndPoint="1.0,0">
<LinearGradientBrush.GradientStops>
<GradientStop Color="#80FFFFFF" Offset="0.2"/>
<GradientStop Color="#F2FFFFFF" Offset="0.8"/>
<GradientStop Color="#BFFFFFFF" Offset="0.2"/>
<GradientStop Color="#A6FFFFFF" Offset="0.50"/>
</LinearGradientBrush.GradientStops>
</LinearGradientBrush>
</Setter.Value>
Expand All @@ -49,24 +54,45 @@
</Border.Style>
</Border>

<TopPanel DockPanel.Dock="Top" Grid.Row="0" />

<DockPanel Grid.Row="1">
<FilterPanel x:Name="PART_FilterPanel"
<DockPanel Grid.RowSpan="2">
<DockPanel.Style>
<Style TargetType="DockPanel">
<Setter Property="Margin" Value="60,0,0,0" />
<Style.Triggers>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
<Setter Property="Margin" Value="0,0,60,0" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Top">
<Setter Property="Margin" Value="0,60,0,0" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Bottom">
<Setter Property="Margin" Value="0,0,0,60" />
</DataTrigger>
<DataTrigger Binding="{Settings ShowSidebar}" Value="False">
<Setter Property="Margin" Value="0,0,0,0" />
</DataTrigger>
</Style.Triggers>
</Style>
</DockPanel.Style>
<TopPanel DockPanel.Dock="Top" />
<DockPanel DockPanel.Dock="Top" >
<FilterPanel x:Name="PART_FilterPanel"
DockPanel.Dock="{Settings FilterPanelPosition}"
Width="{Settings FilterPanelWitdh}"
Visibility="{Settings FilterPanelVisible}"/>

<ExplorerPanel Visibility="{Settings ExplorerPanelVisible}"
<ExplorerPanel Visibility="{Settings ExplorerPanelVisible}"
DockPanel.Dock="{Settings ExplorerPanelPosition}"
Width="{Settings ExplorerPanelWitdh}"/>

<Grid DockPanel.Dock="Left">
<LibraryDetailsView x:Name="PART_ViewDetails" />
<LibraryGridView x:Name="PART_ViewGrid" />
<LibraryListView x:Name="PART_ViewList" />
</Grid>

<Grid DockPanel.Dock="Left">
<LibraryDetailsView x:Name="PART_ViewDetails" />
<LibraryGridView x:Name="PART_ViewGrid" />
<LibraryListView x:Name="PART_ViewList" />
</Grid>
</DockPanel>
</DockPanel>

</Grid>
</ControlTemplate>
</Setter.Value>
Expand Down
40 changes: 34 additions & 6 deletions source/Views/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,41 @@
</ThicknessAnimationUsingKeyFrames>
</Storyboard>
</Grid.Resources>

<Grid>
<Border>
<Border.Style>
<Style TargetType="Border">
<Setter Property="Margin" Value="60,0,0,0" />
<Style.Triggers>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
<Setter Property="Margin" Value="0,0,60,0" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Top">
<Setter Property="Margin" Value="0,60,0,0" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Bottom">
<Setter Property="Margin" Value="0,0,0,60" />
</DataTrigger>
<DataTrigger Binding="{Settings ShowSidebar}" Value="False">
<Setter Property="Margin" Value="0,0,0,0" />
</DataTrigger>
<DataTrigger Binding="{Binding ElementName=PART_ContentView, Path=DataContext.ActiveView.Tag, TargetNullValue='', FallbackValue=''}" Value="Library">
<Setter Property="Margin" Value="0" />
</DataTrigger>
</Style.Triggers>
</Style>
</Border.Style>

<ContentControl Name="PART_ContentView" />
</Border>
<DockPanel>
<Sidebar x:Name="PART_Sidebar" Panel.ZIndex="999"
DockPanel.Dock="{Settings SidebarPosition}" />

</DockPanel>
</Grid>

<DockPanel>
<Sidebar x:Name="PART_Sidebar" Panel.ZIndex="999"
DockPanel.Dock="{Settings SidebarPosition}" />
<ContentControl Name="PART_ContentView"
DockPanel.Dock="Top" />
</DockPanel>
<NotificationPanel x:Name="PART_Notifications"
WindowChrome.IsHitTestVisibleInChrome="True"
Width="260"
Expand Down
15 changes: 11 additions & 4 deletions source/Views/Sidebar.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d">

<Style TargetType="{x:Type Sidebar}">
<Setter Property="Background" Value="Transparent" />
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Sidebar}">
<Border Background="{DynamicResource SidebarBackgroundBrush}" BorderThickness="0,0,0,0" BorderBrush="{DynamicResource SidebarMarginBrush}"
<Border Background="{TemplateBinding Background}" BorderThickness="0,0,0,0" BorderBrush="{DynamicResource SidebarMarginBrush}"
x:Name="BorderContentHolder" Margin="{TemplateBinding Padding}">
<DockPanel x:Name="DockContentHolder" MinWidth="52">
<DockPanel x:Name="DockContentHolder" MinWidth="60">
<Border x:Name="PART_ElemMainMenu" Background="Transparent"
Width="40" Height="40" Margin="2,18,2,40"
Width="40" Height="40" Margin="2,28,2,40"
DockPanel.Dock="Top" Padding="5" Cursor="Hand"
WindowChrome.IsHitTestVisibleInChrome="True">
<Image Source="{ThemeFile 'Images/applogo.png'}"
Expand All @@ -27,21 +28,27 @@
</DockPanel>
</Border>
<ControlTemplate.Triggers>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Left">
<Setter Property="HorizontalAlignment" Value="Left" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Right">
<Setter Property="Margin" Value="8,45,2,40" TargetName="PART_ElemMainMenu" />
<Setter Property="HorizontalAlignment" Value="Right" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Top">
<Setter Property="Margin" Value="8,0,40,0" TargetName="PART_ElemMainMenu" />
<Setter Property="DockPanel.Dock" Value="Left" TargetName="PART_ElemMainMenu" />
<Setter Property="DockPanel.Dock" Value="Left" TargetName="ScrollSidebarItems" />
<Setter Property="Margin" Value="0,0,100,0" TargetName="ScrollSidebarItems" />
<Setter Property="Orientation" Value="Horizontal" TargetName="PART_PanelSideBarItems" />
<Setter Property="VerticalAlignment" Value="Top" />
</DataTrigger>
<DataTrigger Binding="{Settings SidebarPosition}" Value="Bottom">
<Setter Property="Margin" Value="8,0,40,0" TargetName="PART_ElemMainMenu" />
<Setter Property="DockPanel.Dock" Value="Left" TargetName="PART_ElemMainMenu" />
<Setter Property="DockPanel.Dock" Value="Left" TargetName="ScrollSidebarItems" />
<Setter Property="Orientation" Value="Horizontal" TargetName="PART_PanelSideBarItems" />
<Setter Property="VerticalAlignment" Value="Bottom" />
</DataTrigger>
</ControlTemplate.Triggers>
</ControlTemplate>
Expand Down
2 changes: 1 addition & 1 deletion source/Views/TopPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@
<ControlTemplate TargetType="{x:Type TopPanel}">
<Border Height="58" BorderBrush="{DynamicResource PanelSeparatorBrush}"
Background="{TemplateBinding Background}"
d:DesignWidth="1280" Margin="0,10,0,10"
d:DesignWidth="1280" Margin="0,20,0,20"
d:DataContext="{x:Static DesignMainViewModel.DesignIntance}">
<Border.Style>
<Style TargetType="Border">
Expand Down

0 comments on commit 8745f64

Please sign in to comment.