mirror of
https://github.com/Ryubing/Ryujinx.git
synced 2025-03-10 09:04:23 +00:00
UI: Give the cheat manager the custom window title bar treatment
This commit is contained in:
parent
7bdf013ba6
commit
c76f32a4ee
@ -20,38 +20,81 @@
|
||||
</Style>
|
||||
</Window.Styles>
|
||||
<Grid Name="CheatGrid" Margin="15" RowDefinitions="Auto,Auto,Auto,*,Auto" ColumnDefinitions="*,*">
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MaxWidth="500"
|
||||
Margin="20,15,20,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
LineHeight="18"
|
||||
Text="{Binding Heading}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
MaxWidth="500"
|
||||
Margin="140,15,20,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
LineHeight="30"
|
||||
Text="{ext:Locale BuildId}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="0,5,110,5"
|
||||
MinWidth="160"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding BuildId}"
|
||||
IsReadOnly="True" />
|
||||
<Grid Name="FlushHeader" Grid.Row="1" Column="0" ColumnSpan="2" RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="Auto,*,Auto,*">
|
||||
<Image
|
||||
Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Name="RyuLogo"
|
||||
HorizontalAlignment="Left"
|
||||
Margin="-7, -22, 7, 0"
|
||||
Height="28"
|
||||
Width="28" />
|
||||
<StackPanel Grid.Row="0" Grid.Column="1" Grid.ColumnSpan="2"
|
||||
Margin="7, -7, 0, 5"
|
||||
Orientation="Horizontal"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Stretch">
|
||||
<TextBlock
|
||||
MaxWidth="500"
|
||||
Margin="0,8,5,0"
|
||||
LineHeight="30"
|
||||
Text="{ext:Locale BuildId}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox
|
||||
Margin="0,0,0,0"
|
||||
MinWidth="135"
|
||||
Text="{Binding BuildId}"
|
||||
IsReadOnly="True" />
|
||||
</StackPanel>
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="4"
|
||||
MaxWidth="500"
|
||||
Margin="0,10,0,5"
|
||||
HorizontalAlignment="Stretch"
|
||||
VerticalAlignment="Center"
|
||||
LineHeight="18"
|
||||
Text="{Binding Heading}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
|
||||
</Grid>
|
||||
<Grid Name="NormalHeader" Grid.Row="1" Column="0" ColumnSpan="2" RowDefinitions="Auto,Auto,Auto" ColumnDefinitions="*,*">
|
||||
<TextBlock
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Grid.ColumnSpan="2"
|
||||
MaxWidth="500"
|
||||
Margin="20,15,20,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
LineHeight="18"
|
||||
Text="{Binding Heading}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBlock
|
||||
Grid.Row="2"
|
||||
Grid.Column="0"
|
||||
MaxWidth="500"
|
||||
Margin="140,15,20,5"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
LineHeight="30"
|
||||
Text="{ext:Locale BuildId}"
|
||||
TextAlignment="Center"
|
||||
TextWrapping="Wrap" />
|
||||
<TextBox
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Margin="0,5,110,5"
|
||||
MinWidth="160"
|
||||
HorizontalAlignment="Center"
|
||||
VerticalAlignment="Center"
|
||||
Text="{Binding BuildId}"
|
||||
IsReadOnly="True" />
|
||||
</Grid>
|
||||
<Border
|
||||
Grid.Row="3"
|
||||
Grid.Column="0"
|
||||
|
@ -4,6 +4,7 @@ using Ryujinx.Ava.Common.Locale;
|
||||
using Ryujinx.Ava.UI.Models;
|
||||
using Ryujinx.Ava.Systems.AppLibrary;
|
||||
using Ryujinx.Ava.Systems.Configuration;
|
||||
using Ryujinx.Ava.UI.ViewModels;
|
||||
using Ryujinx.HLE.FileSystem;
|
||||
using Ryujinx.HLE.HOS;
|
||||
using System.Collections.Generic;
|
||||
@ -32,7 +33,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
Title = RyujinxApp.FormatTitle(LocaleKeys.CheatWindowTitle);
|
||||
}
|
||||
|
||||
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath)
|
||||
public CheatWindow(VirtualFileSystem virtualFileSystem, string titleId, string titleName, string titlePath) : base(useCustomTitleBar: true, 46)
|
||||
{
|
||||
MinWidth = 500;
|
||||
MinHeight = 650;
|
||||
@ -44,6 +45,10 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
FlushHeader.IsVisible = !ConfigurationState.Instance.ShowTitleBar;
|
||||
NormalHeader.IsVisible = ConfigurationState.Instance.ShowTitleBar;
|
||||
RyuLogo.Source = MainWindowViewModel.IconBitmap;
|
||||
|
||||
string modsBasePath = ModLoader.GetModsBasePath();
|
||||
string titleModsPath = ModLoader.GetApplicationDir(modsBasePath, titleId);
|
||||
ulong titleIdValue = ulong.Parse(titleId, NumberStyles.HexNumber);
|
||||
|
@ -21,12 +21,10 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
SearchBoxNormal = { Text = titleId ?? string.Empty }
|
||||
});
|
||||
|
||||
public CompatibilityListWindow() : base(useCustomTitleBar: true)
|
||||
public CompatibilityListWindow() : base(useCustomTitleBar: true, 37)
|
||||
{
|
||||
Title = RyujinxApp.FormatTitle(LocaleKeys.CompatibilityListTitle);
|
||||
|
||||
TitleBar.Height = 37;
|
||||
|
||||
InitializeComponent();
|
||||
|
||||
RyuLogo.Source = MainWindowViewModel.IconBitmap;
|
||||
|
@ -22,7 +22,7 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
await appWindow.ShowDialog(owner ?? RyujinxApp.MainWindow);
|
||||
}
|
||||
|
||||
protected StyleableAppWindow(bool useCustomTitleBar = false)
|
||||
protected StyleableAppWindow(bool useCustomTitleBar = false, double? titleBarHeight = null)
|
||||
{
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
||||
@ -34,6 +34,9 @@ namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
TitleBar.ExtendsContentIntoTitleBar = !ConfigurationState.Instance.ShowTitleBar;
|
||||
TitleBar.TitleBarHitTestType = ConfigurationState.Instance.ShowTitleBar ? TitleBarHitTestType.Simple : TitleBarHitTestType.Complex;
|
||||
|
||||
if (TitleBar.ExtendsContentIntoTitleBar && titleBarHeight != null)
|
||||
TitleBar.Height = titleBarHeight.Value;
|
||||
}
|
||||
|
||||
Icon = MainWindowViewModel.IconBitmap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user