mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-30 22:47:12 +02:00
UI: Fix diaglog popups doubling the window controls and laying text over the menu bar.
This commit is contained in:
parent
045f9a39bb
commit
430073817c
21 changed files with 75 additions and 60 deletions
|
@ -1,4 +1,4 @@
|
|||
<window:StyleableWindow
|
||||
<window:StyleableAppWindow
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
@ -72,4 +72,4 @@
|
|||
Click="CancelButton_Click" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</window:StyleableWindow>
|
||||
</window:StyleableAppWindow>
|
||||
|
|
|
@ -5,7 +5,7 @@ using Ryujinx.UI.Common.Models.Amiibo;
|
|||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
public partial class AmiiboWindow : StyleableWindow
|
||||
public partial class AmiiboWindow : StyleableAppWindow
|
||||
{
|
||||
public AmiiboWindow(bool showAll, string lastScannedAmiiboId, string titleId)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<window:StyleableWindow
|
||||
<window:StyleableAppWindow
|
||||
x:Class="Ryujinx.Ava.UI.Windows.CheatWindow"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
@ -123,4 +123,4 @@
|
|||
</DockPanel>
|
||||
</DockPanel>
|
||||
</Grid>
|
||||
</window:StyleableWindow>
|
||||
</window:StyleableAppWindow>
|
||||
|
|
|
@ -14,7 +14,7 @@ using System.Linq;
|
|||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
public partial class CheatWindow : StyleableWindow
|
||||
public partial class CheatWindow : StyleableAppWindow
|
||||
{
|
||||
private readonly string _enabledCheatsPath;
|
||||
public bool NoCheatsFound { get; }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<window:StyleableWindow
|
||||
<window:StyleableAppWindow
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
|
@ -11,15 +11,15 @@
|
|||
x:Class="Ryujinx.Ava.UI.Windows.ContentDialogOverlayWindow"
|
||||
Title="ContentDialogOverlayWindow"
|
||||
Focusable="False">
|
||||
<window:StyleableWindow.Styles>
|
||||
<window:StyleableAppWindow.Styles>
|
||||
<Style Selector="ui|ContentDialog /template/ Panel#LayoutRoot">
|
||||
<Setter Property="Background"
|
||||
Value="Transparent" />
|
||||
</Style>
|
||||
</window:StyleableWindow.Styles>
|
||||
</window:StyleableAppWindow.Styles>
|
||||
<ui:ContentDialog Name="ContentDialog"
|
||||
IsPrimaryButtonEnabled="True"
|
||||
IsSecondaryButtonEnabled="True"
|
||||
IsVisible="False"
|
||||
Focusable="True"/>
|
||||
</window:StyleableWindow>
|
||||
</window:StyleableAppWindow>
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
{
|
||||
InitializeComponent();
|
||||
|
||||
TransparencyLevelHint = new[] { WindowTransparencyLevel.Transparent };
|
||||
TransparencyLevelHint = [WindowTransparencyLevel.Transparent];
|
||||
WindowStartupLocation = WindowStartupLocation.Manual;
|
||||
SystemDecorations = SystemDecorations.None;
|
||||
ExtendClientAreaTitleBarHeightHint = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<window:StyleableWindow
|
||||
<window:StyleableAppWindow
|
||||
x:Class="Ryujinx.Ava.UI.Windows.MainWindow"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
|
@ -200,4 +200,4 @@
|
|||
Grid.Row="2" />
|
||||
</Grid>
|
||||
</Grid>
|
||||
</window:StyleableWindow>
|
||||
</window:StyleableAppWindow>
|
||||
|
|
|
@ -35,9 +35,11 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
public partial class MainWindow : StyleableWindow
|
||||
public partial class MainWindow : StyleableAppWindow
|
||||
{
|
||||
internal static MainWindowViewModel ViewModel { get; private set; }
|
||||
internal static MainWindowViewModel MainWindowViewModel { get; private set; }
|
||||
|
||||
public MainWindowViewModel ViewModel { get; }
|
||||
|
||||
internal readonly AvaHostUIHandler UiHandler;
|
||||
|
||||
|
@ -69,7 +71,7 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
public MainWindow()
|
||||
{
|
||||
DataContext = ViewModel = new MainWindowViewModel();
|
||||
DataContext = ViewModel = MainWindowViewModel = new MainWindowViewModel();
|
||||
|
||||
InitializeComponent();
|
||||
Load();
|
||||
|
@ -78,8 +80,8 @@ namespace Ryujinx.Ava.UI.Windows
|
|||
|
||||
ViewModel.Title = App.FormatTitle();
|
||||
|
||||
TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
TitleBar.TitleBarHitTestType = TitleBarHitTestType.Complex;
|
||||
//TitleBar.ExtendsContentIntoTitleBar = true;
|
||||
//TitleBar.TitleBarHitTestType = TitleBarHitTestType.Complex;
|
||||
|
||||
|
||||
// NOTE: Height of MenuBar and StatusBar is not usable here, since it would still be 0 at this point.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<window:StyleableWindow
|
||||
<window:StyleableAppWindow
|
||||
x:Class="Ryujinx.Ava.UI.Windows.SettingsWindow"
|
||||
xmlns="https://github.com/avaloniaui"
|
||||
xmlns:ui="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia"
|
||||
|
@ -127,4 +127,4 @@
|
|||
Command="{Binding ApplyButton}" />
|
||||
</ReversibleStackPanel>
|
||||
</Grid>
|
||||
</window:StyleableWindow>
|
||||
</window:StyleableAppWindow>
|
||||
|
|
|
@ -8,7 +8,7 @@ using System;
|
|||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
public partial class SettingsWindow : StyleableWindow
|
||||
public partial class SettingsWindow : StyleableAppWindow
|
||||
{
|
||||
internal SettingsViewModel ViewModel { get; set; }
|
||||
|
||||
|
|
|
@ -11,7 +11,31 @@ using System.Reflection;
|
|||
|
||||
namespace Ryujinx.Ava.UI.Windows
|
||||
{
|
||||
public class StyleableWindow : AppWindow
|
||||
public class StyleableAppWindow : AppWindow
|
||||
{
|
||||
public StyleableAppWindow()
|
||||
{
|
||||
WindowStartupLocation = WindowStartupLocation.CenterOwner;
|
||||
TransparencyLevelHint = [WindowTransparencyLevel.None];
|
||||
|
||||
LocaleManager.Instance.LocaleChanged += LocaleChanged;
|
||||
LocaleChanged();
|
||||
}
|
||||
|
||||
private void LocaleChanged()
|
||||
{
|
||||
FlowDirection = LocaleManager.Instance.IsRTL() ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
|
||||
ExtendClientAreaChromeHints = ExtendClientAreaChromeHints.SystemChrome | ExtendClientAreaChromeHints.OSXThickTitleBar;
|
||||
}
|
||||
}
|
||||
|
||||
public class StyleableWindow : Window
|
||||
{
|
||||
public StyleableWindow()
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue