mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-19 09:46:30 +02:00
misc: chore: [ci skip] Reduce duplicated close button & command space styling for dialogs
This commit is contained in:
parent
f7976753fd
commit
57c22a1f32
5 changed files with 26 additions and 44 deletions
|
@ -1,6 +1,7 @@
|
|||
using Avalonia.Controls;
|
||||
using Avalonia.Input.Platform;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Styling;
|
||||
using FluentAvalonia.UI.Controls;
|
||||
using Ryujinx.Ava.Common.Locale;
|
||||
|
@ -29,17 +30,7 @@ namespace Ryujinx.Ava.UI.Views.Misc
|
|||
Content = new ApplicationDataView { ViewModel = new ApplicationDataViewModel(appData) }
|
||||
};
|
||||
|
||||
Style closeButton = new(x => x.Name("CloseButton"));
|
||||
closeButton.Setters.Add(new Setter(WidthProperty, 160d));
|
||||
|
||||
Style closeButtonParent = new(x => x.Name("CommandSpace"));
|
||||
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty,
|
||||
Avalonia.Layout.HorizontalAlignment.Center));
|
||||
|
||||
contentDialog.Styles.Add(closeButton);
|
||||
contentDialog.Styles.Add(closeButtonParent);
|
||||
|
||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles(160, HorizontalAlignment.Center));
|
||||
}
|
||||
|
||||
public ApplicationDataView()
|
||||
|
|
|
@ -32,17 +32,7 @@ namespace Ryujinx.Ava.UI.Views.Misc
|
|||
Content = new DlcSelectView { ViewModel = viewModel }
|
||||
};
|
||||
|
||||
Style closeButton = new(x => x.Name("CloseButton"));
|
||||
closeButton.Setters.Add(new Setter(WidthProperty, 80d));
|
||||
|
||||
Style closeButtonParent = new(x => x.Name("CommandSpace"));
|
||||
closeButtonParent.Setters.Add(new Setter(HorizontalAlignmentProperty,
|
||||
Avalonia.Layout.HorizontalAlignment.Right));
|
||||
|
||||
contentDialog.Styles.Add(closeButton);
|
||||
contentDialog.Styles.Add(closeButtonParent);
|
||||
|
||||
await ContentDialogHelper.ShowAsync(contentDialog);
|
||||
await ContentDialogHelper.ShowAsync(contentDialog.ApplyStyles());
|
||||
|
||||
return viewModel.SelectedDlc;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue