Skip to content

Portable Tool for an Ideal Windows Setup

-added preview flick, correction, fixed action for notice

Greedeks9ccd4e676b8a
diff --git a/.Source/GTweak/Languages/en/Localize.xaml b/.Source/GTweak/Languages/en/Localize.xaml
index f1e48168..0d45f5b1 100644
--- a/.Source/GTweak/Languages/en/Localize.xaml
+++ b/.Source/GTweak/Languages/en/Localize.xaml
@@ -183,16 +183,17 @@
<v:String x:Key="tgl30_interface">Open «Quick Access» instead of «This PC»</v:String>
<v:String x:Key="textcolor_interface">This is an example of a new color.</v:String>
+ <v:String x:Key="previewflick_interface">For a comparison</v:String>
<v:String x:Key="TglButton1_description_interface">Will change the color of the cursor selection from blue to gray «The color of wet asphalt».</v:String>
<v:String x:Key="TglButton2_description_interface">Will change the color of the tooltip in some programs from yellow to light blue «Azure».</v:String>
<v:String x:Key="TglButton3_description_interface">The tweak will reduce the size of the Сollapse, Expand and close Buttons, making them less bulky. Resizes all windows, including Explorer, Windows Photos, browsers, and other programs you know.</v:String>
- <v:String x:Key="TglButton4_description_interface">Will accelerate the cursor flicker frequency, default value: 530. This tweak will change the value to 250.</v:String>
+ <v:String x:Key="TglButton4_description_interface">The tweak accelerates the flicker frequency of the text cursor. By default, it is every 530 milliseconds.</v:String>
<v:String x:Key="TglButton5_description_interface">The tweak will make the Scrollbar thickness thinner in windows, including browsers and programs.</v:String>
- <v:String x:Key="TglButton6_description_interface">Tweak will disable/enable the transparency effect. Translucent windows and surfaces.</v:String>
+ <v:String x:Key="TglButton6_description_interface">Tweak will disable or enable the transparency effect. Translucent windows and surfaces.</v:String>
<v:String x:Key="TglButton7_description_interface">Changes the taskbar theme to light or dark. Attention, the screen may blink.</v:String>
<v:String x:Key="TglButton8_description_interface">The tweak will change the explorer theme to light or dark, including browsers and other programs that support the device theme. Attention the screen may blink.</v:String>
- <v:String x:Key="TglButton9_description_interface">By default, additional context menu items appear with a delay of 400 ms. If you want it to be faster, you can reduce this delay to 20 ms.</v:String>
+ <v:String x:Key="TglButton9_description_interface">By default, additional context menu items appear with a delay of 400 milliseconds. If you want to go faster, you can reduce this delay.</v:String>
<v:String x:Key="TglButton10_description_interface">By default, the Taskbar preview shows previews of running applications for too long. To make previews appear faster, apply this tweak.</v:String>
<v:String x:Key="TglButton11_description_interface">Tweak will remove arrows from labels by replacing the arrow file.</v:String>
<v:String x:Key="TglButton12_description_interface">Removing the too intuitive prefix-postfix for labels.</v:String>
diff --git a/.Source/GTweak/Languages/ru/Localize.xaml b/.Source/GTweak/Languages/ru/Localize.xaml
index 713fc8ba..2036ab06 100644
--- a/.Source/GTweak/Languages/ru/Localize.xaml
+++ b/.Source/GTweak/Languages/ru/Localize.xaml
@@ -183,16 +183,17 @@
<v:String x:Key="tgl30_interface">Открывать «Быстрый доступ» вместо «Этот компьютер»</v:String>
<v:String x:Key="textcolor_interface">Это пример нового цвета.</v:String>
+ <v:String x:Key="previewflick_interface">В качестве сравнения</v:String>
<v:String x:Key="TglButton1_description_interface">Изменят цвет выделение курсором с синего на серый «Цвет мокрого асфальта».</v:String>
<v:String x:Key="TglButton2_description_interface">Изменит цвет всплывающей подсказки в некоторых программах с жёлтого на светло голубой «Небесная лазурь».</v:String>
<v:String x:Key="TglButton3_description_interface">Твик уменьшит размер кнопок Свернуть, Развернуть, Закрыть делая их менее громоздкими. Изменяет размер для всех окон, включая Проводник, фотографии, браузеры и другие известные вам программы.</v:String>
- <v:String x:Key="TglButton4_description_interface">Ускорит частоту мерцания курсора, по умолчанию значение: 530. Данный твик изменит значение на 250.</v:String>
+ <v:String x:Key="TglButton4_description_interface">Твик ускоряет частоту мерцания текстового курсора. По умолчанию она составляет каждые 530 миллисекунд.</v:String>
<v:String x:Key="TglButton5_description_interface">Твик сделает тоньше толщину Scrollbar в окнах, включая браузеры и программы.</v:String>
- <v:String x:Key="TglButton6_description_interface">Твик отключит/включит эффект прозрачности. Полупрозрачные окна и поверхности.</v:String>
+ <v:String x:Key="TglButton6_description_interface">Твик отключит или включит эффект прозрачности. Полупрозрачные окна и поверхности.</v:String>
<v:String x:Key="TglButton7_description_interface">Изменяет тему панели задач на светлую или тёмную. Внимание может моргать экран.</v:String>
<v:String x:Key="TglButton8_description_interface">Твик поменяет тему проводника на светлую или тёмную, включая браузеры и прочие программы поддерживающие тему устройства. Внимание может моргать экран.</v:String>
- <v:String x:Key="TglButton9_description_interface">По умолчанию, дополнительные пункты контекстного меню появляются с задержкой 400 мс. Если вы хотите быстрее, можно эту задежку сократить до 20 мс.</v:String>
+ <v:String x:Key="TglButton9_description_interface">По умолчанию, дополнительные пункты контекстного меню появляются с задержкой 400 миллисекунд. Если вы хотите быстрее, можно эту задержку сократить.</v:String>
<v:String x:Key="TglButton10_description_interface">По умолчанию, предпросмотр на Панели задач показывает превью запущенных приложений слишком долго. Чтобы превьюшки показывались быстрее, примените данный твик.</v:String>
<v:String x:Key="TglButton11_description_interface">Твик позволит убрать стрелки с ярлыков с помощью подмены файла стрелки.</v:String>
<v:String x:Key="TglButton12_description_interface">Удаление слишком интуитивного префикса-постфикса для ярлыков.</v:String>
diff --git a/.Source/GTweak/Utilities/Helpers/INIManager.cs b/.Source/GTweak/Utilities/Helpers/INIManager.cs
index 11bfae31..cac57e31 100644
--- a/.Source/GTweak/Utilities/Helpers/INIManager.cs
+++ b/.Source/GTweak/Utilities/Helpers/INIManager.cs
@@ -58,17 +58,7 @@ namespace GTweak.Utilities.Helpers
List<string> result = new List<string>();
foreach (string data in temp)
- {
- switch (isGetKey)
- {
- case true:
- result.Add(data.Substring(0, data.IndexOf("=", StringComparison.InvariantCulture)));
- break;
- case false:
- result.Add(data.Remove(0, data.IndexOf("=", StringComparison.InvariantCulture)).Substring(1));
- break;
- }
- }
+ result.Add(isGetKey ? data.Substring(0, data.IndexOf("=", StringComparison.InvariantCulture)) : data.Remove(0, data.IndexOf("=", StringComparison.InvariantCulture)).Substring(1));
return result;
}
diff --git a/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs b/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
index 9764f80f..21b2a344 100644
--- a/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
+++ b/.Source/GTweak/Utilities/Helpers/TaskSchedulerManager.cs
@@ -5,7 +5,7 @@ namespace GTweak.Utilities.Helpers
{
internal class TaskSchedulerManager
{
- internal bool IsTaskEnabled(string[] tasklist)
+ internal bool IsTaskEnabled(in string[] tasklist)
{
byte numberRunningTask = 0;
using (Microsoft.Win32.TaskScheduler.TaskService taskService = new Microsoft.Win32.TaskScheduler.TaskService())
diff --git a/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs b/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
index 38f3fc62..190e1de1 100644
--- a/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
+++ b/.Source/GTweak/Utilities/Helpers/TypewriterAnimation.cs
@@ -7,7 +7,7 @@ namespace GTweak.Utilities.Helpers
{
internal sealed class TypewriterAnimation
{
- internal TypewriterAnimation(string textToAnimate, TextBlock textBlock, TimeSpan timeSpan)
+ internal TypewriterAnimation(in string textToAnimate, in TextBlock textBlock, in TimeSpan timeSpan)
{
if (!(textBlock.FindName(textBlock.Name) is TextBlock)) return;
@@ -31,7 +31,7 @@ namespace GTweak.Utilities.Helpers
storyBoard.Remove(textBlock);
}
- private StringAnimationUsingKeyFrames StringAnimation(string textToAnimate, TimeSpan timeSpan)
+ private StringAnimationUsingKeyFrames StringAnimation(in string textToAnimate, in TimeSpan timeSpan)
{
StringAnimationUsingKeyFrames stringAnimation = new StringAnimationUsingKeyFrames
{
@@ -54,7 +54,7 @@ namespace GTweak.Utilities.Helpers
return stringAnimation;
}
- private DoubleAnimation OpacityAnimation(TimeSpan timeSpan)
+ private DoubleAnimation OpacityAnimation(in TimeSpan timeSpan)
{
DoubleAnimation opacityAnimation = new DoubleAnimation
{
diff --git a/.Source/GTweak/Utilities/Helpers/UnarchiveManager.cs b/.Source/GTweak/Utilities/Helpers/UnarchiveManager.cs
index a23a66a3..1817809b 100644
--- a/.Source/GTweak/Utilities/Helpers/UnarchiveManager.cs
+++ b/.Source/GTweak/Utilities/Helpers/UnarchiveManager.cs
@@ -5,7 +5,7 @@ namespace GTweak.Utilities.Helpers
{
internal sealed class UnarchiveManager
{
- internal UnarchiveManager(string path, byte[] resource)
+ internal UnarchiveManager(in string path, in byte[] resource)
{
byte[] fileSize = default;
using (MemoryStream fileOut = new MemoryStream(resource))
diff --git a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
index 908942fe..ad0b0f01 100644
--- a/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
+++ b/.Source/GTweak/Utilities/Tweaks/InterfaceTweaks.cs
@@ -44,7 +44,7 @@ namespace GTweak.Utilities.Tweaks
if (Registry.GetValue(@"HKEY_CURRENT_USER\Control Panel\Desktop", "CursorBlinkRate", null) == null ||
- Registry.GetValue(@"HKEY_CURRENT_USER\Control Panel\Desktop", "CursorBlinkRate", string.Empty).ToString() != "250")
+ Registry.GetValue(@"HKEY_CURRENT_USER\Control Panel\Desktop", "CursorBlinkRate", string.Empty).ToString() == "530")
interfaceV.TglButton4.StateNA = true;
else
interfaceV.TglButton4.StateNA = false;
@@ -442,7 +442,7 @@ namespace GTweak.Utilities.Tweaks
break;
case "TglButton4":
if (isChoose)
- RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Desktop", "CursorBlinkRate", "250", RegistryValueKind.String);
+ RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Desktop", "CursorBlinkRate", "200", RegistryValueKind.String);
else
RegistryHelp.Write(Registry.CurrentUser, @"Control Panel\Desktop", "CursorBlinkRate", "530", RegistryValueKind.String);
break;
diff --git a/.Source/GTweak/View/ConfidentialityView.xaml b/.Source/GTweak/View/ConfidentialityView.xaml
index 3d055a37..1a641301 100644
--- a/.Source/GTweak/View/ConfidentialityView.xaml
+++ b/.Source/GTweak/View/ConfidentialityView.xaml
@@ -62,7 +62,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="1">
- <Rectangle Fill="{StaticResource Color_Accent}" Width="900" Height="1" RadiusX="15" RadiusY="15" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+ <Border Background="{StaticResource Color_Accent}" Height="1" Width="900" VerticalAlignment="Top" HorizontalAlignment="Center" CornerRadius="15"/>
<TextBlock x:Name="TextDescription" Style="{StaticResource Description}" Text="{DynamicResource defaultDescription}"/>
</Grid>
diff --git a/.Source/GTweak/View/InterfaceView.xaml b/.Source/GTweak/View/InterfaceView.xaml
index b14faf52..d40ace2e 100644
--- a/.Source/GTweak/View/InterfaceView.xaml
+++ b/.Source/GTweak/View/InterfaceView.xaml
@@ -77,9 +77,61 @@
</Grid.RowDefinitions>
<Grid Grid.Row="1">
- <Rectangle Fill="{StaticResource Color_Accent}" Width="900" Height="1" RadiusX="15" RadiusY="15" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+ <Border Background="{StaticResource Color_Accent}" Height="1" Width="900" VerticalAlignment="Top" HorizontalAlignment="Center" CornerRadius="15"/>
<TextBlock x:Name="TextDescription" Style="{StaticResource Description}" Text="{DynamicResource defaultDescription}"/>
<TextBlock x:Name="TextViewColor" Style="{StaticResource Description}" Text="{DynamicResource textcolor_interface}" VerticalAlignment="Top" Foreground="#505050" Visibility="Hidden" Margin="0,28,0,0"/>
+ <StackPanel x:Name="PreviewFlick" Orientation="Horizontal" VerticalAlignment="Top" Margin="0,28,0,0" HorizontalAlignment="Center" Visibility="Hidden">
+ <StackPanel.Style>
+ <Style TargetType="{x:Type StackPanel}">
+ <Style.Triggers>
+ <Trigger Property="Visibility" Value="Visible">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" Duration="0:0:0.5"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </StackPanel.Style>
+ <Border Background="{StaticResource Color_Highlighted}" Height="20" Width="1.2" Margin="0,0,10,0">
+ <Border.Style>
+ <Style TargetType="{x:Type Border}">
+ <Style.Triggers>
+ <Trigger Property="Visibility" Value="Visible">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard Timeline.DesiredFrameRate="400">
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" RepeatBehavior="Forever" AutoReverse="True" Duration="0:0:0.530" />
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ </Border>
+ <TextBlock Style="{StaticResource Description}" Foreground="{StaticResource Color_TetBlock_Inactivity}" Text="{DynamicResource previewflick_interface}"/>
+ <Border Background="{StaticResource Color_Highlighted}" Height="20" Width="1.2" Margin="10,0,0,0">
+ <Border.Style>
+ <Style TargetType="{x:Type Border}">
+ <Style.Triggers>
+ <Trigger Property="Visibility" Value="Visible">
+ <Trigger.EnterActions>
+ <BeginStoryboard>
+ <Storyboard>
+ <DoubleAnimation Storyboard.TargetProperty="Opacity" From="0" To="1" RepeatBehavior="Forever" AutoReverse="True" Duration="0:0:0.200"/>
+ </Storyboard>
+ </BeginStoryboard>
+ </Trigger.EnterActions>
+ </Trigger>
+ </Style.Triggers>
+ </Style>
+ </Border.Style>
+ </Border>
+ </StackPanel>
</Grid>
</Grid>
diff --git a/.Source/GTweak/View/InterfaceView.xaml.cs b/.Source/GTweak/View/InterfaceView.xaml.cs
index cc125e52..7769c05b 100644
--- a/.Source/GTweak/View/InterfaceView.xaml.cs
+++ b/.Source/GTweak/View/InterfaceView.xaml.cs
@@ -44,6 +44,8 @@ namespace GTweak.View
TextViewColor.Visibility = Visibility.Visible;
new TypewriterAnimation((string)FindResource("textcolor_interface"), TextViewColor, TimeSpan.FromMilliseconds(350));
}
+ else if (toggleButton.Name == "TglButton4")
+ PreviewFlick.Visibility = Visibility.Visible;
}
}
@@ -52,6 +54,8 @@ namespace GTweak.View
{
if (TextViewColor.Visibility == Visibility.Visible)
TextViewColor.Visibility = Visibility.Hidden;
+ else if (PreviewFlick.Visibility == Visibility.Visible)
+ PreviewFlick.Visibility = Visibility.Hidden;
if (TextDescription.Text != (string)FindResource("defaultDescription"))
new TypewriterAnimation((string)FindResource("defaultDescription"), TextDescription, TimeSpan.FromMilliseconds(250));
}
diff --git a/.Source/GTweak/View/PakagesView.xaml b/.Source/GTweak/View/PakagesView.xaml
index 903decef..5b0d4b69 100644
--- a/.Source/GTweak/View/PakagesView.xaml
+++ b/.Source/GTweak/View/PakagesView.xaml
@@ -373,7 +373,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="1">
- <Rectangle Fill="{StaticResource Color_Accent}" Width="900" Height="1" RadiusX="15" RadiusY="15" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+ <Border Background="{StaticResource Color_Accent}" Height="1" Width="900" VerticalAlignment="Top" HorizontalAlignment="Center" CornerRadius="15"/>
<TextBlock x:Name="TextDescription" Style="{StaticResource Description}" Text="{DynamicResource defaultDescriptionApp}" Cursor="Arrow"/>
</Grid>
diff --git a/.Source/GTweak/View/ServicesView.xaml b/.Source/GTweak/View/ServicesView.xaml
index 3fd57f25..5248ea69 100644
--- a/.Source/GTweak/View/ServicesView.xaml
+++ b/.Source/GTweak/View/ServicesView.xaml
@@ -69,7 +69,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="1">
- <Rectangle Fill="{StaticResource Color_Accent}" Width="900" Height="1" RadiusX="15" RadiusY="15" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+ <Border Background="{StaticResource Color_Accent}" Height="1" Width="900" VerticalAlignment="Top" HorizontalAlignment="Center" CornerRadius="15"/>
<TextBlock x:Name="TextDescription" Style="{StaticResource Description}" Text="{DynamicResource defaultDescription}"/>
</Grid>
diff --git a/.Source/GTweak/View/SystemView.xaml b/.Source/GTweak/View/SystemView.xaml
index 21c693c5..95659557 100644
--- a/.Source/GTweak/View/SystemView.xaml
+++ b/.Source/GTweak/View/SystemView.xaml
@@ -79,7 +79,7 @@
</Grid.RowDefinitions>
<Grid Grid.Row="1">
- <Rectangle Fill="{StaticResource Color_Accent}" Width="900" Height="1" RadiusX="15" RadiusY="15" Margin="2" VerticalAlignment="Top" HorizontalAlignment="Center"/>
+ <Border Background="{StaticResource Color_Accent}" Height="1" Width="900" VerticalAlignment="Top" HorizontalAlignment="Center" CornerRadius="15"/>
<TextBlock x:Name="TextDescription" Style="{StaticResource Description}" Text="{DynamicResource defaultDescription}"/>
</Grid>
</Grid>
diff --git a/.Source/GTweak/Windows/NotificationWindow.xaml.cs b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
index 676fd2f4..0192b82b 100644
--- a/.Source/GTweak/Windows/NotificationWindow.xaml.cs
+++ b/.Source/GTweak/Windows/NotificationWindow.xaml.cs
@@ -42,17 +42,21 @@ namespace GTweak.Windows
private void ActionSelection_PreviewMouseDown(object sender, MouseButtonEventArgs e)
{
- if (e.LeftButton == MouseButtonState.Pressed)
+ if (e.LeftButton == MouseButtonState.Pressed && !string.IsNullOrEmpty(ActionNotice))
{
- switch (ActionNotice)
+ string arguments = ActionNotice switch
+ {
+ "logout" => @"/c logoff",
+ _ => @"/c shutdown /r /t 0",
+ };
+
+ Process.Start(new ProcessStartInfo()
{
- case "logout":
- Process.Start("logoff");
- break;
- case "restart":
- Process.Start("shutdown", "/r /t 0");
- break;
- }
+ Arguments = arguments,
+ WindowStyle = ProcessWindowStyle.Hidden,
+ CreateNoWindow = true,
+ FileName = "cmd.exe"
+ });
}
}