mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-25 21:07:20 -08:00
code_style: remove unused code
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
e3c0f7d496
commit
98612b0024
4 changed files with 5 additions and 28 deletions
|
@ -1,6 +1,3 @@
|
|||
using System;
|
||||
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
|
@ -9,31 +6,11 @@ namespace SourceGit.Views
|
|||
{
|
||||
public partial class FileHistories : ChromelessWindow
|
||||
{
|
||||
public static readonly StyledProperty<bool> HasLeftCaptionButtonProperty =
|
||||
AvaloniaProperty.Register<FileHistories, bool>(nameof(HasLeftCaptionButton));
|
||||
|
||||
public bool HasLeftCaptionButton
|
||||
{
|
||||
get => GetValue(HasLeftCaptionButtonProperty);
|
||||
set => SetValue(HasLeftCaptionButtonProperty, value);
|
||||
}
|
||||
|
||||
public FileHistories()
|
||||
{
|
||||
if (OperatingSystem.IsMacOS())
|
||||
HasLeftCaptionButton = true;
|
||||
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
|
||||
{
|
||||
base.OnPropertyChanged(change);
|
||||
|
||||
if (change.Property == WindowStateProperty)
|
||||
HasLeftCaptionButton = WindowState != WindowState.FullScreen;
|
||||
}
|
||||
|
||||
private void OnPressCommitSHA(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
if (sender is TextBlock { DataContext: Models.Commit commit } &&
|
||||
|
|
Loading…
Reference in a new issue