Ava UI: Various Fixes (#4268)

* Fix saves disappearing

* Better size formatter

* Move TextBox alignment fix to Styles

* Fix bug

* Left align

* Add border

* Update Ryujinx.Ava/UI/Models/SaveModel.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx.Ava/UI/Models/SaveModel.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Update Ryujinx.Ava/UI/Models/SaveModel.cs

Co-authored-by: Ac_K <Acoustik666@gmail.com>

* Whitespace

Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
Isaac Marovitz 2023-01-12 07:23:24 -05:00 committed by GitHub
parent fe29a2ff6e
commit 9f57747c57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 42 additions and 18 deletions

View file

@ -55,6 +55,11 @@
HorizontalContentAlignment="Left"
Content="{locale:Locale Size}" />
</ComboBoxItem>
<ComboBox.Styles>
<Style Selector="ContentControl#ContentPresenter">
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</ComboBox.Styles>
</ComboBox>
<ComboBox SelectedIndex="{Binding OrderIndex}" Width="150">
<ComboBoxItem>
@ -69,6 +74,11 @@
HorizontalContentAlignment="Left"
Content="{locale:Locale OrderDescending}" />
</ComboBoxItem>
<ComboBox.Styles>
<Style Selector="ContentControl#ContentPresenter">
<Setter Property="HorizontalAlignment" Value="Left" />
</Style>
</ComboBox.Styles>
</ComboBox>
</StackPanel>
<Grid
@ -122,6 +132,8 @@
Height="42"
Width="42"
Padding="10"
BorderBrush="{DynamicResource AppListHoverBackgroundColor}"
BorderThickness="1"
IsVisible="{Binding !InGameList}">
<ui:SymbolIcon
Symbol="Help"

View file

@ -94,7 +94,7 @@ namespace Ryujinx.Ava.UI.Views.User
var save = saveDataInfo[i];
if (save.ProgramId.Value != 0)
{
var saveModel = new SaveModel(save, _horizonClient, _virtualFileSystem);
var saveModel = new SaveModel(save, _virtualFileSystem);
saves.Add(saveModel);
}
}
@ -137,10 +137,9 @@ namespace Ryujinx.Ava.UI.Views.User
if (result == UserResult.Yes)
{
_horizonClient.Fs.DeleteSaveData(SaveDataSpaceId.User, saveModel.SaveId);
ViewModel.Saves.Remove(saveModel);
ViewModel.Sort();
}
ViewModel.Saves.Remove(saveModel);
ViewModel.Views.Remove(saveModel);
}
}
}