mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-12-16 12:09:51 +00:00
Update title with page
This commit is contained in:
parent
1c6ee14499
commit
dbcfdcd1ac
@ -1,4 +1,5 @@
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Notifications;
|
||||
using Avalonia.Media.Imaging;
|
||||
using Avalonia.Styling;
|
||||
@ -22,6 +23,12 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
private readonly RyujinxSetupWizardWindow _window;
|
||||
private readonly bool _overwrite;
|
||||
|
||||
public void SetWindowTitle(string titleText)
|
||||
{
|
||||
_window.Title = titleText;
|
||||
ToolTip.SetTip(_window.RyuLogo, titleText);
|
||||
}
|
||||
|
||||
public RyujinxSetupWizard(RyujinxSetupWizardWindow wizardWindow, bool overwriteMode)
|
||||
{
|
||||
_window = wizardWindow;
|
||||
@ -32,6 +39,10 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
UpdateLogoTheme(ConfigurationState.Instance.UI.BaseStyle);
|
||||
RyujinxApp.ThemeChanged += Ryujinx_ThemeChanged;
|
||||
}
|
||||
else
|
||||
{
|
||||
UpdateLogoTheme("Dark");
|
||||
}
|
||||
}
|
||||
|
||||
private SetupWizardPage FirstPage() => new(_window.WizardPresenter, this, isFirstPage: true);
|
||||
@ -55,6 +66,9 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
|
||||
public RyujinxNotificationManager NotificationManager { get; private set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial SetupWizardPage CurrentPage { get; set; }
|
||||
|
||||
public async Task Start()
|
||||
{
|
||||
NotificationManager = _window.CreateNotificationManager(
|
||||
|
||||
@ -2,18 +2,16 @@
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||
xmlns:windows="clr-namespace:Ryujinx.Ava.UI.Windows"
|
||||
xmlns:setupWizard="clr-namespace:Ryujinx.Ava.UI.SetupWizard"
|
||||
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
||||
CanResize="False"
|
||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||
x:Class="Ryujinx.Ava.UI.SetupWizard.RyujinxSetupWizardWindow"
|
||||
x:DataType="setupWizard:RyujinxSetupWizard"
|
||||
Title="{ext:Locale SetupWizardFirstPageTitle}">
|
||||
x:DataType="setupWizard:RyujinxSetupWizard">
|
||||
<Grid VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RowDefinitions="Auto,*">
|
||||
<Grid Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Left" Name="FlushControls">
|
||||
<controls:RyujinxLogo ToolTip.Tip="{ext:Locale SetupWizardFirstPageTitle}"/>
|
||||
<controls:RyujinxLogo Name="RyuLogo"/>
|
||||
</Grid>
|
||||
<ContentPresenter Grid.Row="1" Name="WizardPresenter"/>
|
||||
</Grid>
|
||||
|
||||
@ -50,6 +50,7 @@ namespace Ryujinx.Ava.UI.SetupWizard
|
||||
public async ValueTask<bool> Show()
|
||||
{
|
||||
contentPresenter.Content = new SetupWizardPageView { ViewModel = this };
|
||||
ownerWizard.SetWindowTitle(Title);
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user