mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-23 05:05:00 +00:00
refactor: code cleanup
This commit is contained in:
parent
04f4293421
commit
fa3a3b2dad
25 changed files with 174 additions and 233 deletions
|
@ -3,7 +3,6 @@
|
|||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Data.Converters;
|
||||
using Avalonia.Media;
|
||||
|
||||
namespace SourceGit.Converters
|
||||
{
|
||||
|
@ -39,19 +38,6 @@ namespace SourceGit.Converters
|
|||
}
|
||||
});
|
||||
|
||||
public static readonly FuncValueConverter<WindowState, StreamGeometry> ToMaxOrRestoreIcon =
|
||||
new FuncValueConverter<WindowState, StreamGeometry>(state =>
|
||||
{
|
||||
if (state == WindowState.Maximized)
|
||||
{
|
||||
return Application.Current?.FindResource("Icons.Window.Restore") as StreamGeometry;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Application.Current?.FindResource("Icons.Window.Maximize") as StreamGeometry;
|
||||
}
|
||||
});
|
||||
|
||||
public static readonly FuncValueConverter<WindowState, bool> IsNormal =
|
||||
new FuncValueConverter<WindowState, bool>(state => state == WindowState.Normal);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue