mirror of
https://git.naxdy.org/Mirror/Ryujinx.git
synced 2025-03-14 20:00:17 +00:00
Loading Screen fixes
This commit is contained in:
parent
2a3043b7ba
commit
d6d18d76da
3 changed files with 12 additions and 8 deletions
|
@ -179,6 +179,9 @@
|
||||||
<Style Selector="Button">
|
<Style Selector="Button">
|
||||||
<Setter Property="MinWidth" Value="80" />
|
<Setter Property="MinWidth" Value="80" />
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="ProgressBar /template/ Border#ProgressBarTrack">
|
||||||
|
<Setter Property="IsVisible" Value="False" />
|
||||||
|
</Style>
|
||||||
<Style Selector="ToggleButton">
|
<Style Selector="ToggleButton">
|
||||||
<Setter Property="Padding" Value="0,-5,0,0" />
|
<Setter Property="Padding" Value="0,-5,0,0" />
|
||||||
</Style>
|
</Style>
|
||||||
|
|
|
@ -512,7 +512,8 @@
|
||||||
IsVisible="{Binding ShowLoadProgress}"
|
IsVisible="{Binding ShowLoadProgress}"
|
||||||
Text="{Binding LoadHeading}"
|
Text="{Binding LoadHeading}"
|
||||||
TextAlignment="Left"
|
TextAlignment="Left"
|
||||||
TextWrapping="Wrap" />
|
TextWrapping="Wrap"
|
||||||
|
MaxWidth="500" />
|
||||||
<Border
|
<Border
|
||||||
Grid.Row="1"
|
Grid.Row="1"
|
||||||
Margin="10"
|
Margin="10"
|
||||||
|
@ -529,7 +530,6 @@
|
||||||
Margin="0"
|
Margin="0"
|
||||||
Padding="0"
|
Padding="0"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
Background="{Binding ProgressBarBackgroundColor}"
|
|
||||||
ClipToBounds="True"
|
ClipToBounds="True"
|
||||||
CornerRadius="5"
|
CornerRadius="5"
|
||||||
Foreground="{Binding ProgressBarForegroundColor}"
|
Foreground="{Binding ProgressBarForegroundColor}"
|
||||||
|
@ -545,7 +545,8 @@
|
||||||
FontSize="18"
|
FontSize="18"
|
||||||
IsVisible="{Binding ShowLoadProgress}"
|
IsVisible="{Binding ShowLoadProgress}"
|
||||||
Text="{Binding CacheLoadStatus}"
|
Text="{Binding CacheLoadStatus}"
|
||||||
TextAlignment="Left" />
|
TextAlignment="Left"
|
||||||
|
MaxWidth="500" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
|
@ -573,18 +573,18 @@ namespace Ryujinx.Ava.UI.Windows
|
||||||
|
|
||||||
private void PrepareLoadScreen()
|
private void PrepareLoadScreen()
|
||||||
{
|
{
|
||||||
using MemoryStream stream = new MemoryStream(ViewModel.SelectedIcon);
|
using MemoryStream stream = new(ViewModel.SelectedIcon);
|
||||||
using var gameIconBmp = SixLabors.ImageSharp.Image.Load<Bgra32>(stream);
|
using var gameIconBmp = SixLabors.ImageSharp.Image.Load<Bgra32>(stream);
|
||||||
|
|
||||||
var dominantColor = IconColorPicker.GetFilteredColor(gameIconBmp).ToPixel<Bgra32>();
|
var dominantColor = IconColorPicker.GetFilteredColor(gameIconBmp).ToPixel<Bgra32>();
|
||||||
|
|
||||||
const int ColorDivisor = 4;
|
const float colorMultiple = 0.5f;
|
||||||
|
|
||||||
Color progressFgColor = Color.FromRgb(dominantColor.R, dominantColor.G, dominantColor.B);
|
Color progressFgColor = Color.FromRgb(dominantColor.R, dominantColor.G, dominantColor.B);
|
||||||
Color progressBgColor = Color.FromRgb(
|
Color progressBgColor = Color.FromRgb(
|
||||||
(byte)(dominantColor.R / ColorDivisor),
|
(byte)(dominantColor.R * colorMultiple),
|
||||||
(byte)(dominantColor.G / ColorDivisor),
|
(byte)(dominantColor.G * colorMultiple),
|
||||||
(byte)(dominantColor.B / ColorDivisor));
|
(byte)(dominantColor.B * colorMultiple));
|
||||||
|
|
||||||
ViewModel.ProgressBarForegroundColor = new SolidColorBrush(progressFgColor);
|
ViewModel.ProgressBarForegroundColor = new SolidColorBrush(progressFgColor);
|
||||||
ViewModel.ProgressBarBackgroundColor = new SolidColorBrush(progressBgColor);
|
ViewModel.ProgressBarBackgroundColor = new SolidColorBrush(progressBgColor);
|
||||||
|
|
Loading…
Reference in a new issue