Skip to content

Portable Tool for an Ideal Windows Setup

upd.replace DropShadow with pseudo-shadow and add BitmapCache

Greedeks964d9b6ad227
diff --git a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml b/.Source/GTweak/Assets/UserControl/ToggleButton.xaml
index af2386a4..7fc66127 100644
--- a/.Source/GTweak/Assets/UserControl/ToggleButton.xaml
+++ b/.Source/GTweak/Assets/UserControl/ToggleButton.xaml
@@ -1,4 +1,4 @@
-<UserControl x:Class="GTweak.Assets.UserControl.ToggleButton"
+<UserControl x:Class="GTweak.Assets.UserControl.ToggleButton"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
diff --git a/.Source/GTweak/Properties/AssemblyInfo.cs b/.Source/GTweak/Properties/AssemblyInfo.cs
index a3a7dd40..96ea71c0 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.cs
+++ b/.Source/GTweak/Properties/AssemblyInfo.cs
@@ -7,9 +7,9 @@ using System.Windows;
[assembly: AssemblyProduct("GTweak")]
[assembly: AssemblyCopyright("� 2024-2026 Greedeks")]
[assembly: AssemblyTrademark("Greedeks")]
-[assembly: AssemblyInformationalVersion("Build: 5.4.3")]
-[assembly: AssemblyVersion("5.4.19.279")]
-[assembly: AssemblyFileVersion("5.4.19.279")]
+[assembly: AssemblyInformationalVersion("Build: 5.4.4")]
+[assembly: AssemblyVersion("5.4.58.911")]
+[assembly: AssemblyFileVersion("5.4.58.911")]
[assembly: ComVisible(false)]
diff --git a/.Source/GTweak/Properties/AssemblyInfo.tt b/.Source/GTweak/Properties/AssemblyInfo.tt
index ea3d94f1..28f63eaf 100644
--- a/.Source/GTweak/Properties/AssemblyInfo.tt
+++ b/.Source/GTweak/Properties/AssemblyInfo.tt
@@ -22,7 +22,7 @@ using System.Windows;
[assembly: AssemblyMetadata("RepositoryType", "git")]
<#+
- private const string majorVersion = "Build: 5.4.3";
+ private const string majorVersion = "Build: 5.4.4";
private string GenerateVersion()
{
diff --git a/.Source/GTweak/Styles/Buttons/RadioButtons.xaml b/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
index f42da546..c20ce16b 100644
--- a/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
+++ b/.Source/GTweak/Styles/Buttons/RadioButtons.xaml
@@ -17,27 +17,45 @@
<Setter.Value>
<ControlTemplate TargetType="RadioButton">
<Border x:Name="OuterPanel" CornerRadius="12" Width="50" Height="48" Background="Transparent" HorizontalAlignment="Left" SnapsToDevicePixels="True">
- <Border x:Name="InnerPanel" Height="48" CornerRadius="12" Background="{TemplateBinding Background}" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,0,10,0">
- <Grid Height="48">
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="48"/>
- <ColumnDefinition Width="Auto"/>
- </Grid.ColumnDefinitions>
- <ContentPresenter x:Name="IconPresenter" Grid.Column="0" Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5">
- <ContentPresenter.RenderTransform>
- <ScaleTransform ScaleX="1" ScaleY="1"/>
- </ContentPresenter.RenderTransform>
- </ContentPresenter>
- <Viewbox x:Name="NavTextBox" Grid.Column="1" Stretch="Uniform" StretchDirection="DownOnly" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,15,0" Opacity="0">
- <TextBlock Text="{TemplateBinding Tag}" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" TextWrapping="NoWrap"/>
- </Viewbox>
- </Grid>
- </Border>
+ <Grid CacheMode="BitmapCache">
+ <Border x:Name="ShadowPanel" CornerRadius="12" Opacity="0" Background="#33000000" IsHitTestVisible="False" Width="{Binding ActualWidth, ElementName=InnerPanel}" Height="{Binding ActualHeight, ElementName=InnerPanel}" HorizontalAlignment="Left" VerticalAlignment="Center">
+ <Border.RenderTransform>
+ <TranslateTransform X="3" Y="4" />
+ </Border.RenderTransform>
+ </Border>
+ <Border x:Name="InnerPanel" Height="48" CornerRadius="12" Background="{TemplateBinding Background}" HorizontalAlignment="Left" VerticalAlignment="Center" Padding="0,0,10,0">
+ <Grid Height="48">
+ <Rectangle x:Name="ContentShadowMask" Grid.ColumnSpan="2" Fill="#33000000" Opacity="0.7" IsHitTestVisible="False">
+ <Rectangle.RenderTransform>
+ <TranslateTransform X="3" Y="3" />
+ </Rectangle.RenderTransform>
+ <Rectangle.OpacityMask>
+ <VisualBrush Visual="{Binding ElementName=RealContent}" Stretch="None" AlignmentX="Left" AlignmentY="Center" />
+ </Rectangle.OpacityMask>
+ </Rectangle>
+ <Grid x:Name="RealContent" Background="Transparent">
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="48"/>
+ <ColumnDefinition Width="Auto"/>
+ </Grid.ColumnDefinitions>
+ <ContentPresenter x:Name="IconPresenter" Grid.Column="0" Content="{TemplateBinding Content}" VerticalAlignment="Center" HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5">
+ <ContentPresenter.RenderTransform>
+ <ScaleTransform ScaleX="1" ScaleY="1"/>
+ </ContentPresenter.RenderTransform>
+ </ContentPresenter>
+ <Viewbox x:Name="NavTextBox" Grid.Column="1" Stretch="Uniform" StretchDirection="DownOnly" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,15,0" Opacity="0">
+ <TextBlock Text="{TemplateBinding Tag}" Foreground="{TemplateBinding Foreground}" FontFamily="{TemplateBinding FontFamily}" TextWrapping="NoWrap"/>
+ </Viewbox>
+ </Grid>
+ </Grid>
+ </Border>
+ </Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter TargetName="InnerPanel" Property="Background" Value="{StaticResource Brush_BtnBG_Navigation}"/>
<Setter Property="Foreground" Value="{StaticResource Brush_Accent}"/>
+ <Setter TargetName="ShadowPanel" Property="Opacity" Value="0.8"/>
<Trigger.EnterActions>
<BeginStoryboard>
<Storyboard Timeline.DesiredFrameRate="120">
@@ -95,6 +113,7 @@
<Setter TargetName="InnerPanel" Property="Background" Value="{StaticResource Brush_BtnBG_Navigation}"/>
<Setter Property="Foreground" Value="{StaticResource Brush_Accent}"/>
<Setter TargetName="NavTextBox" Property="Opacity" Value="1"/>
+ <Setter TargetName="ShadowPanel" Property="Opacity" Value="0.8"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
diff --git a/.Source/GTweak/View/DataSystemView.xaml b/.Source/GTweak/View/DataSystemView.xaml
index 94befb88..60305c77 100644
--- a/.Source/GTweak/View/DataSystemView.xaml
+++ b/.Source/GTweak/View/DataSystemView.xaml
@@ -37,7 +37,7 @@
</Grid.ColumnDefinitions>
<Grid Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="10,2,10,0">
- <Ellipse Height="90" Width="90" Stroke="{StaticResource Brush_Separator}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="{StaticResource RadialProgressOpacity}">
+ <Ellipse CacheMode="BitmapCache" Height="90" Width="90" Stroke="{StaticResource Brush_Separator}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="{StaticResource RadialProgressOpacity}">
<Ellipse.Effect>
<DropShadowEffect Opacity="0.3"/>
</Ellipse.Effect>
@@ -58,7 +58,7 @@
<uc:FlowPanel Grid.Column="1" ContentAlignment="Center" HorizontalSpacing="0" VerticalSpacing="0" VerticalAlignment="Top" Margin="30,15,30,0">
<StackPanel Orientation="Horizontal">
- <Border Width="70" Height="70" HorizontalAlignment="Right" Margin="0,0,15,0">
+ <Border Width="70" Height="70" HorizontalAlignment="Right" Margin="0,0,15,0" CacheMode="BitmapCache">
<Border.Background>
<ImageBrush ImageSource="{Binding DisplayWallpaper, TargetNullValue={StaticResource Icon_LogoWin}, Mode=OneWay}" Stretch="UniformToFill"/>
</Border.Background>
@@ -91,7 +91,7 @@
</uc:FlowPanel>
<Grid Grid.Column="2" VerticalAlignment="Top" HorizontalAlignment="Right" Margin="10,2,15,0">
- <Ellipse Height="90" Width="90" Stroke="{StaticResource Brush_Separator}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="{StaticResource RadialProgressOpacity}">
+ <Ellipse CacheMode="BitmapCache" Height="90" Width="90" Stroke="{StaticResource Brush_Separator}" StrokeThickness="4.5" VerticalAlignment="Center" HorizontalAlignment="Center" Opacity="{StaticResource RadialProgressOpacity}">
<Ellipse.Effect>
<DropShadowEffect Opacity="0.5"/>
</Ellipse.Effect>
diff --git a/.Source/GTweak/Windows/MainWindow.xaml b/.Source/GTweak/Windows/MainWindow.xaml
index 4acb40ba..8c619f5b 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml
+++ b/.Source/GTweak/Windows/MainWindow.xaml
@@ -96,7 +96,7 @@
</Border.OpacityMask>
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" CanContentScroll="True">
- <Grid Width="400" Margin="0" VirtualizingStackPanel.IsVirtualizing="True">
+ <Grid Width="400" Margin="0" VirtualizingStackPanel.IsVirtualizing="True">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
@@ -104,14 +104,14 @@
</Grid.RowDefinitions>
<Grid Grid.Row="0">
- <TextBlock FontFamily="{StaticResource Jura}" Text="{DynamicResource title_settings_main}" Foreground="{StaticResource Brush_Accent}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0">
+ <TextBlock CacheMode="BitmapCache" FontFamily="{StaticResource Jura}" Text="{DynamicResource title_settings_main}" Foreground="{StaticResource Brush_Accent}" FontSize="20" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="0,10,0,0">
<TextBlock.Effect>
<DropShadowEffect BlurRadius="20" ShadowDepth="1" Direction="-90" Color="{StaticResource Color_Shadow}" />
</TextBlock.Effect>
</TextBlock>
<Border Background="{StaticResource Brush_Separator}" Height="1.2" Width="330" VerticalAlignment="Bottom" CornerRadius="10" Margin="0,50,0,0"/>
</Grid>
-
+
<Grid Grid.Row="1">
<StackPanel Orientation="Vertical">
<Viewbox HorizontalAlignment="Left" Stretch="Uniform" StretchDirection="DownOnly" Height="23" Margin="40,15,10,0">
@@ -137,7 +137,7 @@
<Viewbox HorizontalAlignment="Left" Stretch="Uniform" StretchDirection="DownOnly" Height="45" Margin="40,10,10,0">
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">
<TextBlock Style="{StaticResource TextDefault}" Text="{DynamicResource cmbox_lang_main}"/>
- <ComboBox Style="{StaticResource CustomComboBoxStyle}" Margin="10,0,0,0" Height="33" ItemsSource="{Binding Languages}" SelectedValue="{Binding SelectedLanguage, Mode=TwoWay}" SelectedValuePath="Code" DisplayMemberPath="Display" />
+ <ComboBox Style="{StaticResource CustomComboBoxStyle}" CacheMode="BitmapCache" Margin="10,0,0,0" Height="33" ItemsSource="{Binding Languages}" SelectedValue="{Binding SelectedLanguage, Mode=TwoWay}" SelectedValuePath="Code" DisplayMemberPath="Display" />
</StackPanel>
</Viewbox>
@@ -228,15 +228,16 @@
</ScrollViewer>
</Border>
- <Border Background="#33000000" Opacity="0.7" CornerRadius="10" Margin="12,17,-3,47"/>
+ <Border Background="#33000000" Opacity="0.7" CornerRadius="10" Margin="10,15,0,50" IsHitTestVisible="False">
+ <Border.RenderTransform>
+ <TranslateTransform X="2" Y="4" />
+ </Border.RenderTransform>
+ </Border>
<Border Background="{StaticResource Brush_Background_NavPanel}" CornerRadius="10" Margin="10,15,0,50"/>
<Grid Grid.ColumnSpan="2" Panel.ZIndex="100" VerticalAlignment="Top">
<Border Margin="0,15,0,50" MinWidth="70" MaxWidth="320" HorizontalAlignment="Left" ClipToBounds="True">
- <Border.Effect>
- <DropShadowEffect Color="#33000000" Opacity="0.5" BlurRadius="10" ShadowDepth="2"/>
- </Border.Effect>
-
+
<ScrollViewer Padding="0,0,15,0" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" CanContentScroll="True" FlowDirection="RightToLeft">
<StackPanel Orientation="Vertical" FlowDirection="LeftToRight">
diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml b/.Source/GTweak/Windows/NotificationWindow.xaml
index 9209a45d..46d58322 100644
--- a/.Source/GTweak/Windows/NotificationWindow.xaml
+++ b/.Source/GTweak/Windows/NotificationWindow.xaml
@@ -20,7 +20,7 @@
<Button x:Name="ButtonClose" Style="{StaticResource TitleButtonClose}" Margin="0,2.5,2.5,0" HorizontalAlignment="Right" VerticalAlignment="Center" PreviewMouseLeftButtonUp="ButtonClose_PreviewMouseLeftButtonUp"/>
</StackPanel>
- <DockPanel VerticalAlignment="Center" HorizontalAlignment="Left" LastChildFill="True">
+ <DockPanel CacheMode="BitmapCache" VerticalAlignment="Center" HorizontalAlignment="Left" LastChildFill="True">
<TextBlock x:Name="TitleName" Text="GTweak" FontSize="15" FontFamily="{StaticResource Jura}" Foreground="{StaticResource Brush_Accent}" VerticalAlignment="Center" Margin="15,0,0,0" TextTrimming="CharacterEllipsis" KeyboardNavigation.IsTabStop="False">
<TextBlock.Effect>
<DropShadowEffect BlurRadius="15" ShadowDepth="0" Opacity="0.7" Color="{StaticResource Color_Shadow}" />
@@ -39,7 +39,7 @@
<Image Width="53" Height="53" Source="/GTweak.ico" VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20,0,0,15" />
</Grid>
- <Grid Grid.Column="1">
+ <Grid Grid.Column="1" CacheMode="BitmapCache">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>