0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 18:05:46 +00:00

Ava: Cleanup XML

This commit is contained in:
Evan Husted 2024-10-19 16:36:39 -05:00
parent c0cc3c4188
commit 59b3ff7802
12 changed files with 29 additions and 158 deletions

View file

@ -12,16 +12,7 @@
x:DataType="applet:ControllerAppletDialog"> x:DataType="applet:ControllerAppletDialog">
<Grid <Grid
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto" ColumnDefinitions="*,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border <Border
Grid.Column="0" Grid.Column="0"
Grid.Row="0" Grid.Row="0"

View file

@ -17,16 +17,7 @@
<Grid <Grid
Margin="20" Margin="20"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto" ColumnDefinitions="Auto,*">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image <Image
Grid.Row="1" Grid.Row="1"
Grid.RowSpan="2" Grid.RowSpan="2"

View file

@ -12,18 +12,7 @@
<Grid <Grid
Margin="20" Margin="20"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" RowDefinitions="Auto,Auto,Auto,Auto,Auto" ColumnDefinitions="Auto,*">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Image <Image
Grid.Row="1" Grid.Row="1"
Grid.RowSpan="5" Grid.RowSpan="5"

View file

@ -1,15 +1,10 @@
using Avalonia.Media.Imaging; using Avalonia.Media.Imaging;
using Avalonia.Platform;
using Avalonia.Styling; using Avalonia.Styling;
using Avalonia.Threading; using Avalonia.Threading;
using Ryujinx.Ava.Common; using Ryujinx.Ava.Common;
using Ryujinx.Ava.Common.Locale; using Ryujinx.Ava.Common.Locale;
using Ryujinx.Common.Utilities;
using Ryujinx.UI.Common.Configuration; using Ryujinx.UI.Common.Configuration;
using System; using System;
using System.Net.Http;
using System.Net.NetworkInformation;
using System.Threading.Tasks;
namespace Ryujinx.Ava.UI.ViewModels namespace Ryujinx.Ava.UI.ViewModels
{ {
@ -76,10 +71,7 @@ namespace Ryujinx.Ava.UI.ViewModels
DiscordLogo = LoadBitmap($"{basePath}Logo_Discord_{themeSuffix}?assembly=Ryujinx.UI.Common"); DiscordLogo = LoadBitmap($"{basePath}Logo_Discord_{themeSuffix}?assembly=Ryujinx.UI.Common");
} }
private Bitmap LoadBitmap(string uri) private static Bitmap LoadBitmap(string uri) => new(Avalonia.Platform.AssetLoader.Open(new Uri(uri)));
{
return new Bitmap(Avalonia.Platform.AssetLoader.Open(new Uri(uri)));
}
public void Dispose() public void Dispose()
{ {

View file

@ -29,12 +29,7 @@
Margin="5" Margin="5"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding EnableNonGameRunningControls}"> IsVisible="{Binding EnableNonGameRunningControls}">
<Grid Margin="0"> <Grid Margin="0" ColumnDefinitions="Auto,Auto,*">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<Button <Button
Width="25" Width="25"
Height="25" Height="25"

View file

@ -18,32 +18,17 @@
<Design.DataContext> <Design.DataContext>
<viewModel:AboutWindowViewModel /> <viewModel:AboutWindowViewModel />
</Design.DataContext> </Design.DataContext>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" ColumnDefinitions="Auto,Auto,*">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid <Grid
Grid.Column="0" Grid.Column="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" RowDefinitions="Auto,*,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch" VerticalAlignment="Stretch"
Spacing="10"> Spacing="10">
<Grid> <Grid ColumnDefinitions="Auto,*,Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<StackPanel <StackPanel
Grid.Column="1" Grid.Column="1"
Orientation="Horizontal" Orientation="Horizontal"
@ -84,7 +69,6 @@
Text="{Binding Version}" Text="{Binding Version}"
TextAlignment="Center" /> TextAlignment="Center" />
<Border <Border
Height="1" Height="1"
Margin="0,20, 0, 20" Margin="0,20, 0, 20"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
@ -156,11 +140,7 @@
<Grid <Grid
Grid.Column="2" Grid.Column="2"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" RowDefinitions="Auto,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
Margin="0,10,0,0" Margin="0,10,0,0"

View file

@ -22,18 +22,8 @@
<Design.DataContext> <Design.DataContext>
<viewModels:AmiiboWindowViewModel /> <viewModels:AmiiboWindowViewModel />
</Design.DataContext> </Design.DataContext>
<Grid Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid RowDefinitions="Auto,Auto,*,Auto" Margin="15" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" >
<Grid.RowDefinitions> <Grid ColumnDefinitions="*,*" Grid.Row="1" HorizontalAlignment="Stretch" >
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid Grid.Row="1" HorizontalAlignment="Stretch">
<Grid.ColumnDefinitions>
<ColumnDefinition />
<ColumnDefinition />
</Grid.ColumnDefinitions>
<StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left"> <StackPanel Spacing="10" Orientation="Horizontal" HorizontalAlignment="Left">
<TextBlock VerticalAlignment="Center" Text="{locale:Locale AmiiboSeriesLabel}" /> <TextBlock VerticalAlignment="Center" Text="{locale:Locale AmiiboSeriesLabel}" />
<ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" /> <ComboBox SelectedIndex="{Binding SeriesSelectedIndex}" ItemsSource="{Binding AmiiboSeries}" MinWidth="100" />
@ -51,15 +41,9 @@
TextAlignment="Center" /> TextAlignment="Center" />
</ScrollViewer> </ScrollViewer>
</StackPanel> </StackPanel>
<Grid Grid.Row="3"> <Grid Grid.Row="3" ColumnDefinitions="Auto,Auto,*,Auto,Auto">
<Grid.ColumnDefinitions> <CheckBox Margin="10" Grid.Column="0" VerticalContentAlignment="Center"
<ColumnDefinition Width="Auto" /> IsChecked="{Binding ShowAllAmiibo}"
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<CheckBox Margin="10" Grid.Column="0" VerticalContentAlignment="Center" IsChecked="{Binding ShowAllAmiibo}"
Content="{locale:Locale AmiiboOptionsShowAllLabel}" /> Content="{locale:Locale AmiiboOptionsShowAllLabel}" />
<CheckBox Margin="10" VerticalContentAlignment="Center" Grid.Column="1" IsChecked="{Binding UseRandomUuid}" <CheckBox Margin="10" VerticalContentAlignment="Center" Grid.Column="1" IsChecked="{Binding UseRandomUuid}"
Content="{locale:Locale AmiiboOptionsUsRandomTagLabel}" /> Content="{locale:Locale AmiiboOptionsUsRandomTagLabel}" />
@ -67,7 +51,9 @@
<Button Grid.Column="3" IsEnabled="{Binding EnableScanning}" Width="80" <Button Grid.Column="3" IsEnabled="{Binding EnableScanning}" Width="80"
Content="{locale:Locale AmiiboScanButtonLabel}" Name="ScanButton" Content="{locale:Locale AmiiboScanButtonLabel}" Name="ScanButton"
Click="ScanButton_Click" /> Click="ScanButton_Click" />
<Button Grid.Column="4" Margin="10,0" Width="80" Content="{locale:Locale InputDialogCancel}" <Button Grid.Column="4"
Margin="10,0"
Width="80"
Name="CancelButton" Name="CancelButton"
Click="CancelButton_Click" /> Click="CancelButton_Click" />
</Grid> </Grid>

View file

@ -20,18 +20,7 @@
<Setter Property="IsExpanded" Value="True" /> <Setter Property="IsExpanded" Value="True" />
</Style> </Style>
</Window.Styles> </Window.Styles>
<Grid Name="CheatGrid" Margin="15"> <Grid Name="CheatGrid" Margin="15" RowDefinitions="Auto,Auto,Auto,*,Auto" ColumnDefinitions="*,*">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock <TextBlock
Grid.Row="1" Grid.Row="1"
Grid.Column="0" Grid.Column="0"

View file

@ -21,6 +21,7 @@
x:DataType="viewModels:MainWindowViewModel" x:DataType="viewModels:MainWindowViewModel"
mc:Ignorable="d" mc:Ignorable="d"
WindowStartupLocation="Manual" WindowStartupLocation="Manual"
Icon="resm:Ryujinx.UI.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.UI.Common"
Focusable="True"> Focusable="True">
<Window.Styles> <Window.Styles>
<Style Selector="TitleBar:fullscreen"> <Style Selector="TitleBar:fullscreen">
@ -40,22 +41,11 @@
<KeyBinding Gesture="F9" Command="{Binding ToggleDockMode}" /> <KeyBinding Gesture="F9" Command="{Binding ToggleDockMode}" />
<KeyBinding Gesture="Escape" Command="{Binding ExitCurrentState}" /> <KeyBinding Gesture="Escape" Command="{Binding ExitCurrentState}" />
</Window.KeyBindings> </Window.KeyBindings>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" RowDefinitions="*">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" /> <helpers:OffscreenTextBox IsEnabled="False" Opacity="0" Name="HiddenTextBox" IsHitTestVisible="False" IsTabStop="False" />
<Grid <Grid
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"> VerticalAlignment="Stretch" ColumnDefinitions="*" RowDefinitions="Auto,*,Auto">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel <StackPanel
Name="MenuBar" Name="MenuBar"
MinHeight="35" MinHeight="35"
@ -78,11 +68,8 @@
BorderThickness="0,0,0,0" BorderThickness="0,0,0,0"
DockPanel.Dock="Top" DockPanel.Dock="Top"
IsVisible="{Binding ShowContent}"> IsVisible="{Binding ShowContent}">
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="GameLibrary"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Name="GameLibrary"
<Grid.RowDefinitions> RowDefinitions="Auto,*">
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<main:MainViewControls <main:MainViewControls
Name="ViewControls" Name="ViewControls"
Grid.Row="0"/> Grid.Row="0"/>
@ -116,11 +103,7 @@
Margin="40" Margin="40"
HorizontalAlignment="Center" HorizontalAlignment="Center"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding ShowLoadProgress}"> IsVisible="{Binding ShowLoadProgress}" ColumnDefinitions="Auto,*">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Border <Border
Grid.RowSpan="2" Grid.RowSpan="2"
Grid.Column="0" Grid.Column="0"
@ -143,12 +126,7 @@
Grid.Column="1" Grid.Column="1"
HorizontalAlignment="Stretch" HorizontalAlignment="Stretch"
VerticalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding ShowLoadProgress}"> IsVisible="{Binding ShowLoadProgress}" RowDefinitions="Auto,Auto,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<TextBlock <TextBlock
Grid.Row="0" Grid.Row="0"
Margin="10" Margin="10"

View file

@ -14,21 +14,11 @@
x:CompileBindings="True" x:CompileBindings="True"
x:DataType="viewModels:ModManagerViewModel" x:DataType="viewModels:ModManagerViewModel"
Focusable="True"> Focusable="True">
<Grid> <Grid RowDefinitions="Auto,*,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Panel <Panel
Margin="0 0 0 10" Margin="0 0 0 10"
Grid.Row="0"> Grid.Row="0">
<Grid> <Grid ColumnDefinitions="Auto,Auto,*">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock <TextBlock
Grid.Column="0" Grid.Column="0"
Text="{Binding ModCount}" /> Text="{Binding ModCount}" />

View file

@ -21,12 +21,7 @@
<Design.DataContext> <Design.DataContext>
<viewModels:SettingsViewModel /> <viewModels:SettingsViewModel />
</Design.DataContext> </Design.DataContext>
<Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="600"> <Grid HorizontalAlignment="Stretch" VerticalAlignment="Stretch" MinWidth="600" RowDefinitions="Auto,*,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<ContentPresenter <ContentPresenter
x:Name="ContentPresenter" x:Name="ContentPresenter"
Grid.Row="1" Grid.Row="1"

View file

@ -17,12 +17,7 @@
<UserControl.Resources> <UserControl.Resources>
<helpers:TitleUpdateLabelConverter x:Key="TitleUpdateLabel" /> <helpers:TitleUpdateLabelConverter x:Key="TitleUpdateLabel" />
</UserControl.Resources> </UserControl.Resources>
<Grid> <Grid RowDefinitions="Auto,*,Auto">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<StackPanel <StackPanel
Grid.Row="0" Grid.Row="0"
Margin="0 0 0 10" Margin="0 0 0 10"