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