mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-01-09 14:41:59 +00:00
UI: misc: Collapse repeated identical Border usages into a helper control.
This commit is contained in:
parent
7aede70ba9
commit
41acc4b1f3
2 changed files with 32 additions and 62 deletions
|
@ -7,6 +7,7 @@
|
||||||
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
xmlns:ext="clr-namespace:Ryujinx.Ava.Common.Markup"
|
||||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||||
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
xmlns:viewModels="clr-namespace:Ryujinx.Ava.UI.ViewModels"
|
||||||
|
xmlns:local="clr-namespace:Ryujinx.Ava.UI.Views.Main"
|
||||||
xmlns:config="clr-namespace:Ryujinx.Common.Configuration;assembly=Ryujinx.Common"
|
xmlns:config="clr-namespace:Ryujinx.Common.Configuration;assembly=Ryujinx.Common"
|
||||||
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
|
||||||
x:Class="Ryujinx.Ava.UI.Views.Main.MainStatusBarView"
|
x:Class="Ryujinx.Ava.UI.Views.Main.MainStatusBarView"
|
||||||
|
@ -132,14 +133,7 @@
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</Button.Flyout>
|
</Button.Flyout>
|
||||||
</Button>
|
</Button>
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="DockedStatus"
|
Name="DockedStatus"
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
|
@ -149,14 +143,7 @@
|
||||||
PointerReleased="DockedStatus_PointerReleased"
|
PointerReleased="DockedStatus_PointerReleased"
|
||||||
Text="{Binding DockedStatusText}"
|
Text="{Binding DockedStatusText}"
|
||||||
TextAlignment="Start" />
|
TextAlignment="Start" />
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<SplitButton
|
<SplitButton
|
||||||
Name="AspectRatioStatus"
|
Name="AspectRatioStatus"
|
||||||
Padding="5,0,5,0"
|
Padding="5,0,5,0"
|
||||||
|
@ -203,14 +190,7 @@
|
||||||
</MenuFlyout>
|
</MenuFlyout>
|
||||||
</SplitButton.Flyout>
|
</SplitButton.Flyout>
|
||||||
</SplitButton>
|
</SplitButton>
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<ToggleSplitButton
|
<ToggleSplitButton
|
||||||
Name="VolumeStatus"
|
Name="VolumeStatus"
|
||||||
Padding="5,0,5,0"
|
Padding="5,0,5,0"
|
||||||
|
@ -254,14 +234,7 @@
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</ToggleSplitButton.Flyout>
|
</ToggleSplitButton.Flyout>
|
||||||
</ToggleSplitButton>
|
</ToggleSplitButton>
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
@ -269,14 +242,7 @@
|
||||||
IsVisible="{Binding !ShowLoadProgress}"
|
IsVisible="{Binding !ShowLoadProgress}"
|
||||||
Text="{Binding GameStatusText}"
|
Text="{Binding GameStatusText}"
|
||||||
TextAlignment="Start" />
|
TextAlignment="Start" />
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
@ -298,13 +264,7 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsVisible="{Binding ShowShaderCompilationHint}"
|
IsVisible="{Binding ShowShaderCompilationHint}"
|
||||||
Text="{Binding ShaderCountText}" />
|
Text="{Binding ShaderCountText}" />
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding ShowShaderCompilationHint}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding ShowShaderCompilationHint}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="5,0,5,0"
|
Margin="5,0,5,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
@ -312,14 +272,7 @@
|
||||||
IsVisible="{Binding !ShowLoadProgress}"
|
IsVisible="{Binding !ShowLoadProgress}"
|
||||||
Text="{Binding BackendText}"
|
Text="{Binding BackendText}"
|
||||||
TextAlignment="Start" />
|
TextAlignment="Start" />
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding !ShowLoadProgress}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
Background="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding !ShowLoadProgress}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Margin="5,0,0,0"
|
Margin="5,0,0,0"
|
||||||
HorizontalAlignment="Left"
|
HorizontalAlignment="Left"
|
||||||
|
@ -334,13 +287,7 @@
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsVisible="{Binding ShowFirmwareStatus}"
|
IsVisible="{Binding ShowFirmwareStatus}"
|
||||||
Orientation="Horizontal">
|
Orientation="Horizontal">
|
||||||
<Border
|
<local:StatusBarSeparator IsVisible="{Binding IsGameRunning}" />
|
||||||
Width="2"
|
|
||||||
Height="12"
|
|
||||||
Margin="0"
|
|
||||||
BorderBrush="Gray"
|
|
||||||
BorderThickness="1"
|
|
||||||
IsVisible="{Binding IsGameRunning}" />
|
|
||||||
<TextBlock
|
<TextBlock
|
||||||
Name="FirmwareStatus"
|
Name="FirmwareStatus"
|
||||||
Margin="5, 0, 0, 0"
|
Margin="5, 0, 0, 0"
|
||||||
|
|
|
@ -2,6 +2,7 @@ using Avalonia;
|
||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
|
using Avalonia.Media;
|
||||||
using Avalonia.Threading;
|
using Avalonia.Threading;
|
||||||
using Ryujinx.Ava.Common.Locale;
|
using Ryujinx.Ava.Common.Locale;
|
||||||
using Ryujinx.Ava.UI.Windows;
|
using Ryujinx.Ava.UI.Windows;
|
||||||
|
@ -72,4 +73,26 @@ namespace Ryujinx.Ava.UI.Views.Main
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class StatusBarSeparator : Border
|
||||||
|
{
|
||||||
|
public StatusBarSeparator()
|
||||||
|
{
|
||||||
|
Width = 2;
|
||||||
|
Height = 12;
|
||||||
|
Margin = new Thickness();
|
||||||
|
BorderBrush = Brushes.Gray;
|
||||||
|
Background = Brushes.Gray;
|
||||||
|
BorderThickness = new Thickness(1);
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
<Border
|
||||||
|
Width="2"
|
||||||
|
Height="12"
|
||||||
|
Margin="0"
|
||||||
|
BorderBrush="Gray"
|
||||||
|
Background="Gray"
|
||||||
|
BorderThickness="1"
|
||||||
|
IsVisible="{Binding !ShowLoadProgress}" />*/
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue