code_style: remove unused code

Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
leo 2024-11-01 10:00:37 +08:00
parent e3c0f7d496
commit 98612b0024
No known key found for this signature in database
4 changed files with 5 additions and 28 deletions

View file

@ -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 } &&