UI: Properly space the play time & last play date in the game info popup

This commit is contained in:
Evan Husted 2025-02-06 22:56:25 -06:00
parent d1da937fce
commit a4211fec33
3 changed files with 65 additions and 55 deletions

View File

@ -1576,50 +1576,50 @@
"ID": "GameListHeaderTimePlayed", "ID": "GameListHeaderTimePlayed",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "Spielzeit: {0}", "de_DE": "Spielzeit:",
"el_GR": "Χρόνος: {0}", "el_GR": "Χρόνος:",
"en_US": "Play Time: {0}", "en_US": "Play Time:",
"es_ES": "Tiempo jugado: {0}", "es_ES": "Tiempo jugado:",
"fr_FR": "Temps de jeu: {0}", "fr_FR": "Temps de jeu:",
"he_IL": "", "he_IL": "",
"it_IT": "Tempo di gioco: {0}", "it_IT": "Tempo di gioco:",
"ja_JP": "プレイ時間: {0}", "ja_JP": "プレイ時間:",
"ko_KR": "플레이 타임: {0}", "ko_KR": "플레이 타임:",
"no_NO": "Spilletid: {0}", "no_NO": "Spilletid:",
"pl_PL": "Czas w grze: {0}", "pl_PL": "Czas w grze:",
"pt_BR": "Tempo de jogo: {0}", "pt_BR": "Tempo de jogo:",
"ru_RU": "Время в игре: {0}", "ru_RU": "Время в игре:",
"sv_SE": "Speltid: {0}", "sv_SE": "Speltid:",
"th_TH": "เล่นไปแล้ว: {0}", "th_TH": "เล่นไปแล้ว:",
"tr_TR": "Oynama Süresi: {0}", "tr_TR": "Oynama Süresi:",
"uk_UA": "Зіграно часу: {0}", "uk_UA": "Зіграно часу:",
"zh_CN": "游玩时长: {0}", "zh_CN": "游玩时长:",
"zh_TW": "遊玩時數: {0}" "zh_TW": "遊玩時數:"
} }
}, },
{ {
"ID": "GameListHeaderLastPlayed", "ID": "GameListHeaderLastPlayed",
"Translations": { "Translations": {
"ar_SA": "", "ar_SA": "",
"de_DE": "Zuletzt gespielt: {0}", "de_DE": "Zuletzt gespielt: ",
"el_GR": "Παίχτηκε: {0}", "el_GR": "Παίχτηκε: ",
"en_US": "Last Played: {0}", "en_US": "Last Played:",
"es_ES": "Jugado por última vez: {0}", "es_ES": "Jugado por última vez:",
"fr_FR": "Dernière partie jouée: {0}", "fr_FR": "Dernière partie jouée:",
"he_IL": "", "he_IL": "",
"it_IT": "Ultima partita: {0}", "it_IT": "Ultima partita:",
"ja_JP": "最終プレイ日時: {0}", "ja_JP": "最終プレイ日時:",
"ko_KR": "마지막 플레이: {0}", "ko_KR": "마지막 플레이:",
"no_NO": "Sist Spilt: {0}", "no_NO": "Sist Spilt:",
"pl_PL": "Ostatnio grane: {0}", "pl_PL": "Ostatnio grane:",
"pt_BR": "Último jogo: {0}", "pt_BR": "Último jogo:",
"ru_RU": "Последний запуск: {0}", "ru_RU": "Последний запуск:",
"sv_SE": "Senast spelad: {0}", "sv_SE": "Senast spelad:",
"th_TH": "เล่นล่าสุด: {0}", "th_TH": "เล่นล่าสุด:",
"tr_TR": "Son Oynama Tarihi: {0}", "tr_TR": "Son Oynama Tarihi:",
"uk_UA": "Востаннє зіграно: {0}", "uk_UA": "Востаннє зіграно:",
"zh_CN": "最近游玩: {0}", "zh_CN": "最近游玩:",
"zh_TW": "最近遊玩: {0}" "zh_TW": "最近遊玩:"
} }
}, },
{ {

View File

@ -92,22 +92,35 @@
TextAlignment="Start" TextAlignment="Start"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
<Separator IsVisible="{Binding AppData.HasLdnGames}" Margin="0, 10, 0, 10" Height="1" BorderBrush="Gray" Background="Gray" /> <Separator IsVisible="{Binding AppData.HasLdnGames}" Margin="0, 10, 0, 10" Height="1" BorderBrush="Gray" Background="Gray" />
<StackPanel <StackPanel Orientation="Vertical" Spacing="5">
HorizontalAlignment="Left" <Grid
ColumnDefinitions="Auto,*,Auto">
<TextBlock
Grid.Column="0"
Text="{ext:Locale GameListHeaderLastPlayed}"
VerticalAlignment="Top" VerticalAlignment="Top"
Orientation="Vertical"
Spacing="5">
<TextBlock
HorizontalAlignment="Stretch"
Text="{Binding FormattedLastPlayed}"
TextAlignment="Start" TextAlignment="Start"
TextWrapping="Wrap" /> TextWrapping="NoWrap" />
<TextBlock <TextBlock
HorizontalAlignment="Stretch" Grid.Column="2"
Text="{Binding FormattedPlayTime}" Text="{Binding AppData.LastPlayedString}"
IsVisible="{Binding AppData.HasPlayedPreviously}" TextAlignment="End"
TextAlignment="Start"
TextWrapping="Wrap" /> TextWrapping="Wrap" />
</Grid>
<Grid
ColumnDefinitions="Auto,*,Auto"
IsVisible="{Binding AppData.HasPlayedPreviously}">
<TextBlock
Grid.Column="0"
Text="{ext:Locale GameListHeaderTimePlayed}"
VerticalAlignment="Top"
TextAlignment="Start"
TextWrapping="NoWrap" />
<TextBlock Grid.Column="2"
Text="{Binding AppData.TimePlayedString}"
TextAlignment="End"
TextWrapping="Wrap" />
</Grid>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>
</StackPanel> </StackPanel>

View File

@ -12,10 +12,7 @@ namespace Ryujinx.Ava.UI.ViewModels
public string FormattedVersion => LocaleManager.Instance[LocaleKeys.GameListHeaderVersion].Format(AppData.Version); public string FormattedVersion => LocaleManager.Instance[LocaleKeys.GameListHeaderVersion].Format(AppData.Version);
public string FormattedDeveloper => LocaleManager.Instance[LocaleKeys.GameListHeaderDeveloper].Format(AppData.Developer); public string FormattedDeveloper => LocaleManager.Instance[LocaleKeys.GameListHeaderDeveloper].Format(AppData.Developer);
public string FormattedFileExtension => LocaleManager.Instance[LocaleKeys.GameListHeaderFileExtension].Format(AppData.FileExtension); public string FormattedFileExtension => LocaleManager.Instance[LocaleKeys.GameListHeaderFileExtension].Format(AppData.FileExtension);
public string FormattedLastPlayed => LocaleManager.Instance[LocaleKeys.GameListHeaderLastPlayed].Format(AppData.LastPlayedString);
public string FormattedPlayTime => LocaleManager.Instance[LocaleKeys.GameListHeaderTimePlayed].Format(AppData.TimePlayedString);
public string FormattedFileSize => LocaleManager.Instance[LocaleKeys.GameListHeaderFileSize].Format(AppData.FileSizeString); public string FormattedFileSize => LocaleManager.Instance[LocaleKeys.GameListHeaderFileSize].Format(AppData.FileSizeString);
public string FormattedLdnInfo => public string FormattedLdnInfo =>