Skip to content

Portable Tool for an Ideal Windows Setup

-fixing the update window when using topmost

Greedeks37317f24e2ae
diff --git a/.Source/GTweak/Windows/MainWindow.xaml.cs b/.Source/GTweak/Windows/MainWindow.xaml.cs
index 7e163ed6..cf28d385 100644
--- a/.Source/GTweak/Windows/MainWindow.xaml.cs
+++ b/.Source/GTweak/Windows/MainWindow.xaml.cs
@@ -19,10 +19,10 @@ namespace GTweak
{
InitializeComponent();
- BtnNotification.State = Settings.IsViewNotification;
- BtnSoundNtn.State = Settings.IsSoundNotification;
- BtnTopMost.State = Topmost = Settings.IsTopMost;
- BtnUpdate.State = Settings.IsСheckingUpdate;
+ BtnNotification.StateNA = Settings.IsViewNotification;
+ BtnSoundNtn.StateNA = Settings.IsSoundNotification;
+ BtnTopMost.StateNA = Topmost = Settings.IsTopMost;
+ BtnUpdate.StateNA = Settings.IsСheckingUpdate;
SliderVolume.Value = Settings.VolumeNotification;
LanguageSelectionMenu.SelectedIndex = Settings.Language == "en" ? 0 : 1;
ThemeSelectionMenu.SelectedIndex = Settings.Theme switch
@@ -149,7 +149,7 @@ namespace GTweak
private void BtnTopMost_ChangedState(object sender, EventArgs e)
{
- Parallel.Invoke(() =>
+ Parallel.Invoke(delegate
{
Settings.ChangingParameters(!BtnTopMost.State, "TopMost");
Topmost = Settings.IsTopMost;
diff --git a/.Source/GTweak/Windows/UpdateWindow.xaml b/.Source/GTweak/Windows/UpdateWindow.xaml
index 6a7ad52b..df5c8b59 100644
--- a/.Source/GTweak/Windows/UpdateWindow.xaml
+++ b/.Source/GTweak/Windows/UpdateWindow.xaml
@@ -8,7 +8,7 @@
Title="{DynamicResource title_win_update}" WindowStyle="None"
Height="180" Width="400" MinHeight="180" MinWidth="400" MaxHeight="180" MaxWidth="350"
Background="Transparent" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="CanMinimize"
- IsTabStop="False" ShowInTaskbar="True" Loaded="Window_Loaded" Closing="Window_Closing">
+ IsTabStop="False" Topmost="True" ShowInTaskbar="True" Loaded="Window_Loaded" Closing="Window_Closing">
<Grid MouseDown="TitleBar_MouseDown">
<Border Background="{StaticResource Color_Background}" BorderThickness="1" CornerRadius="7" Opacity="0.98">
<Border.BorderBrush>