mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 00:16:23 +02:00
336 lines
16 KiB
XML
336 lines
16 KiB
XML
<UserControl
|
|
xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
xmlns:controls="clr-namespace:Ryujinx.Ava.UI.Controls"
|
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
|
xmlns:config="clr-namespace:Ryujinx.Common.Configuration;assembly=Ryujinx.Common"
|
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
|
x:Class="Ryujinx.Ava.UI.Views.Main.MainStatusBarView"
|
|
x:DataType="viewModels:MainWindowViewModel">
|
|
<Design.DataContext>
|
|
<viewModels:MainWindowViewModel />
|
|
</Design.DataContext>
|
|
<Grid
|
|
Name="StatusBar"
|
|
Margin="0"
|
|
MinHeight="22"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Bottom"
|
|
Background="{DynamicResource ThemeContentBackgroundColor}"
|
|
DockPanel.Dock="Bottom"
|
|
IsVisible="{Binding ShowMenuAndStatusBar}"
|
|
ColumnDefinitions="Auto,Auto,*,Auto,Auto,Auto">
|
|
<StackPanel
|
|
Grid.Column="0"
|
|
Margin="5"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding EnableNonGameRunningControls}">
|
|
<Grid Margin="0" ColumnDefinitions="Auto,Auto,Auto,*,Auto,Auto,*">
|
|
<Button
|
|
Width="25"
|
|
Height="25"
|
|
MinWidth="0"
|
|
Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
Click="Refresh_OnClick">
|
|
<ui:SymbolIcon
|
|
Width="50"
|
|
Height="100"
|
|
Symbol="Refresh" />
|
|
</Button>
|
|
<TextBlock
|
|
Name="LoadStatus"
|
|
Grid.Column="1"
|
|
Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding EnableNonGameRunningControls}"
|
|
Text="{ext:Locale StatusBarGamesLoaded}" />
|
|
<TextBlock
|
|
Name="StatusBarProgressStatus"
|
|
Grid.Column="2"
|
|
MinWidth="200"
|
|
Margin="10,0,5,0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding StatusBarProgressStatusVisible}"
|
|
Text="{Binding StatusBarProgressStatusText}" />
|
|
<ProgressBar
|
|
Name="LoadProgressBar"
|
|
Grid.Column="3"
|
|
MinWidth="200"
|
|
Height="6"
|
|
VerticalAlignment="Center"
|
|
Margin="0, 0, 5, 0"
|
|
Foreground="{DynamicResource SystemAccentColorLight2}"
|
|
IsVisible="{Binding StatusBarVisible}"
|
|
Maximum="{Binding StatusBarProgressMaximum}"
|
|
Value="{Binding StatusBarProgressValue}" />
|
|
<controls:MiniVerticalSeparator Grid.Column="4" IsVisible="{Binding ShowTotalTimePlayed}" />
|
|
<TextBlock
|
|
Grid.Column="5"
|
|
Margin="5,0,5,0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding ShowTotalTimePlayed}"
|
|
Text="{ext:Locale GameListLabelTotalTimePlayed}">
|
|
</TextBlock>
|
|
</Grid>
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="1"
|
|
Margin="0,2"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding IsGameRunning}"
|
|
MaxHeight="18"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Name="VSyncMode"
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Foreground="{Binding VSyncModeColor}"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
PointerReleased="VSyncMode_PointerReleased"
|
|
Text="{Binding VSyncModeText}"
|
|
TextAlignment="Start"/>
|
|
<Button MinWidth="0"
|
|
Width="20"
|
|
IsVisible="{Binding ShowCustomVSyncIntervalPicker}"
|
|
Margin="-5,0,5,0"
|
|
Background="Transparent"
|
|
BorderThickness="0">
|
|
<ui:SymbolIcon Symbol="Settings"
|
|
HorizontalAlignment="Stretch"
|
|
VerticalAlignment="Center"
|
|
Width="14"
|
|
Height="14"/>
|
|
<Button.Styles>
|
|
<Style Selector=":checked">
|
|
<Style Selector="^:checked ContentPresenter">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundColor}" />
|
|
</Style>
|
|
</Style>
|
|
<Style Selector="Border#SeparatorBorder">
|
|
<Setter Property="Opacity" Value="0" />
|
|
</Style>
|
|
</Button.Styles>
|
|
<Button.Flyout>
|
|
<Flyout Placement="Top" ShowMode="TransientWithDismissOnPointerMoveAway">
|
|
<StackPanel Margin="0,0,0,0"
|
|
Orientation="Horizontal">
|
|
<Slider Value="{Binding CustomVSyncIntervalPercentageProxy}"
|
|
MinWidth="175"
|
|
Margin="0,-3,0,0"
|
|
Height="32"
|
|
Padding="0,-5"
|
|
TickFrequency="1"
|
|
IsSnapToTickEnabled="True"
|
|
LargeChange="10"
|
|
SmallChange="1"
|
|
VerticalAlignment="Center"
|
|
Minimum="10"
|
|
Maximum="400" />
|
|
<TextBlock Margin="5,0"
|
|
Width="40"
|
|
Text="{Binding CustomVSyncIntervalPercentageText}"/>
|
|
</StackPanel>
|
|
</Flyout>
|
|
</Button.Flyout>
|
|
</Button>
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
|
<TextBlock
|
|
Name="DockedStatus"
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
PointerReleased="DockedStatus_PointerReleased"
|
|
Text="{Binding DockedStatusText}"
|
|
TextAlignment="Start" />
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
|
<SplitButton
|
|
Name="AspectRatioStatus"
|
|
Padding="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
CornerRadius="0"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
Content="{Binding AspectRatioStatusText}"
|
|
Click="AspectRatioStatus_OnClick"
|
|
ToolTip.Tip="{ext:Locale AspectRatioTooltip}">
|
|
<SplitButton.Styles>
|
|
<Style Selector="Border#SeparatorBorder">
|
|
<Setter Property="Opacity" Value="0" />
|
|
</Style>
|
|
</SplitButton.Styles>
|
|
<SplitButton.Flyout>
|
|
<MenuFlyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatio4x3}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Fixed4x3}"/>
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatio16x9}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Fixed16x9}"/>
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatio16x10}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Fixed16x10}"/>
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatio21x9}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Fixed21x9}"/>
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatio32x9}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Fixed32x9}"/>
|
|
<MenuItem
|
|
Header="{ext:Locale SettingsTabGraphicsAspectRatioStretch}"
|
|
Command="{Binding SetAspectRatio}"
|
|
CommandParameter="{x:Static config:AspectRatio.Stretched}"/>
|
|
</MenuFlyout>
|
|
</SplitButton.Flyout>
|
|
</SplitButton>
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
|
<ToggleSplitButton
|
|
Name="VolumeStatus"
|
|
Padding="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
VerticalContentAlignment="Center"
|
|
Content="{Binding VolumeStatusText}"
|
|
IsChecked="{Binding VolumeMuted}"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
PointerWheelChanged="VolumeStatus_OnPointerWheelChanged"
|
|
Background="Transparent"
|
|
BorderThickness="0"
|
|
CornerRadius="0">
|
|
<ToggleSplitButton.Styles>
|
|
<Style Selector=":checked">
|
|
<Style Selector="^:checked ContentPresenter">
|
|
<Setter Property="Foreground" Value="{DynamicResource ThemeForegroundColor}" />
|
|
</Style>
|
|
</Style>
|
|
<Style Selector="Border#SeparatorBorder">
|
|
<Setter Property="Opacity" Value="0" />
|
|
</Style>
|
|
</ToggleSplitButton.Styles>
|
|
<ToggleSplitButton.Flyout>
|
|
<Flyout Placement="Bottom" ShowMode="TransientWithDismissOnPointerMoveAway">
|
|
<Grid Margin="0">
|
|
<controls:SliderScroll
|
|
MaxHeight="40"
|
|
Width="150"
|
|
Margin="0"
|
|
Padding="0"
|
|
IsSnapToTickEnabled="True"
|
|
LargeChange="0.05"
|
|
Maximum="1"
|
|
Minimum="0"
|
|
SmallChange="0.01"
|
|
TickFrequency="0.05"
|
|
ToolTip.Tip="{ext:Locale AudioVolumeTooltip}"
|
|
Value="{Binding Volume}" />
|
|
</Grid>
|
|
</Flyout>
|
|
</ToggleSplitButton.Flyout>
|
|
</ToggleSplitButton>
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
|
<TextBlock
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
Text="{Binding GameStatusText}"
|
|
TextAlignment="Start" />
|
|
<controls:MiniVerticalSeparator>
|
|
<controls:MiniVerticalSeparator.IsVisible>
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
<Binding Path="!ShowLoadProgress"/>
|
|
<Binding Path="!IsPaused"/>
|
|
</MultiBinding>
|
|
</controls:MiniVerticalSeparator.IsVisible>
|
|
</controls:MiniVerticalSeparator>
|
|
<TextBlock
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
Text="{Binding FifoStatusText}"
|
|
TextAlignment="Start" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="3"
|
|
Margin="0, 0, 5, 0"
|
|
IsVisible="{Binding IsGameRunning}"
|
|
VerticalAlignment="Center"
|
|
Orientation="Horizontal">
|
|
<TextBlock
|
|
Name="ShaderCount"
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding ShowShaderCompilationHint}"
|
|
Text="{Binding ShaderCountText}" />
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding ShowShaderCompilationHint}" />
|
|
<TextBlock
|
|
Margin="5,0,5,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
Text="{Binding BackendText}"
|
|
TextAlignment="Start" />
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
|
<TextBlock
|
|
Margin="5,0,0,0"
|
|
HorizontalAlignment="Left"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding !ShowLoadProgress}"
|
|
Text="{Binding GpuNameText}"
|
|
TextAlignment="Start" />
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="4"
|
|
Margin="0,0,5,0"
|
|
Orientation="Horizontal">
|
|
<StackPanel.IsVisible>
|
|
<MultiBinding Converter="{x:Static BoolConverters.And}">
|
|
<Binding Path="EnableNonGameRunningControls" />
|
|
<Binding Path="UpdateAvailable" />
|
|
</MultiBinding>
|
|
</StackPanel.IsVisible>
|
|
<Button Margin="0, 0, 5, -2"
|
|
Command="{Binding UpdateCommand}"
|
|
Background="{DynamicResource SystemAccentColor}">
|
|
<TextBlock
|
|
Margin="-5"
|
|
Foreground="{StaticResource SystemColorButtonTextColor}"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{ext:Locale UpdaterBackgroundStatusBarButtonText}" />
|
|
</Button>
|
|
<controls:MiniVerticalSeparator Margin="5,0,0,0"/>
|
|
</StackPanel>
|
|
<StackPanel
|
|
Grid.Column="5"
|
|
Margin="0,0,5,0"
|
|
VerticalAlignment="Center"
|
|
IsVisible="{Binding ShowFirmwareStatus}"
|
|
Orientation="Horizontal">
|
|
<controls:MiniVerticalSeparator IsVisible="{Binding IsGameRunning}" />
|
|
<TextBlock
|
|
Name="FirmwareStatus"
|
|
Margin="5, 0, 0, 0"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Text="{ext:Locale StatusBarSystemVersion}" />
|
|
</StackPanel>
|
|
</Grid>
|
|
</UserControl>
|