Skip to content

Commit

Permalink
Fixed an issue with maximize icon
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Aug 3, 2023
1 parent f77cc1b commit 4593286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions PermaTop/UserControls/WindowPropertyItem.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ private void InitUI()

Favorite item = new(WindowInfo.ClassName, WindowInfo.Title, WindowInfo.ProcessName);
FavBtn.Content = Global.Favorites.Contains(item) ? "\uF71B" : "\uF710";
MaxRestoreBtn.Content = Global.IsWindowMaximized(WindowInfo.Hwnd) ? "\uF670" : "\uFA41";
MaxRestoreBtn.Content = Global.IsWindowMaximized(WindowInfo.Hwnd) ? "\uF670" : "\uFA40";
MaxRestoreBtn.FontSize = Global.IsWindowMaximized(WindowInfo.Hwnd) ? 18 : 14;

IntPtr iconHandle = GetWindowIconHandle(WindowInfo.Hwnd, true); // Set 'true' for large icon, 'false' for small icon
Expand Down Expand Up @@ -158,7 +158,7 @@ private void MaxRestoreBtn_Click(object sender, RoutedEventArgs e)
return;
}
SendMessage(WindowInfo.Hwnd, WM_SYSCOMMAND, (IntPtr)SC_RESTORE, IntPtr.Zero);
MaxRestoreBtn.Content = "\uFA41";
MaxRestoreBtn.Content = "\uFA40";
MaxRestoreBtn.FontSize = 14;
}
catch { }
Expand Down

0 comments on commit 4593286

Please sign in to comment.