mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-14 19:36:59 +00:00
Update title with page
This commit is contained in:
parent
eb77050dd0
commit
8db5912e38
3 changed files with 17 additions and 4 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue