Skip to content

Commit

Permalink
Infra: Capitalisation Consistency (#6296)
Browse files Browse the repository at this point in the history
* Rename Ryujinx.UI.Common

* Rename Ryujinx.UI.LocaleGenerator

* Update in Files

AboutWindow

* Configuration State

* Rename projects

* Ryujinx/UI

* Fix build

* Main remaining inconsistencies

* HLE.UI Namespace

* HLE.UI Files

* Namespace

* Ryujinx.UI.Common.Configuration.UI

* Ryujinx.UI.Common,Configuration.UI Files

* More instances
  • Loading branch information
IsaacMarovitz authored Feb 11, 2024
1 parent 84d6e8d commit f06d22d
Show file tree
Hide file tree
Showing 189 changed files with 648 additions and 648 deletions.
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ gpu:

gui:
- changed-files:
- any-glob-to-any-file: ['src/Ryujinx/**', 'src/Ryujinx.Ui.Common/**', 'src/Ryujinx.Ui.LocaleGenerator/**', 'src/Ryujinx.Ava/**']
- any-glob-to-any-file: ['src/Ryujinx/**', 'src/Ryujinx.UI.Common/**', 'src/Ryujinx.UI.LocaleGenerator/**', 'src/Ryujinx.Ava/**']

horizon:
- changed-files:
Expand Down
4 changes: 2 additions & 2 deletions Ryujinx.sln
Original file line number Diff line number Diff line change
Expand Up @@ -71,15 +71,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Nvdec.FFmp
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ava", "src\Ryujinx.Ava\Ryujinx.Ava.csproj", "{7C1B2721-13DA-4B62-B046-C626605ECCE6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.Common", "src\Ryujinx.Ui.Common\Ryujinx.Ui.Common.csproj", "{BA161CA0-CD65-4E6E-B644-51C8D1E542DC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.UI.Common", "src\Ryujinx.UI.Common\Ryujinx.UI.Common.csproj", "{BA161CA0-CD65-4E6E-B644-51C8D1E542DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Generators", "src\Ryujinx.Horizon.Generators\Ryujinx.Horizon.Generators.csproj", "{6AE2A5E8-4C5A-48B9-997B-E1455C0355C6}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Graphics.Vulkan", "src\Ryujinx.Graphics.Vulkan\Ryujinx.Graphics.Vulkan.csproj", "{D4D09B08-D580-4D69-B886-C35D2853F6C8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spv.Generator", "src\Spv.Generator\Spv.Generator.csproj", "{2BCB3D7A-38C0-4FE7-8FDA-374C6AD56D0E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Ui.LocaleGenerator", "src\Ryujinx.Ui.LocaleGenerator\Ryujinx.Ui.LocaleGenerator.csproj", "{77D01AD9-2C98-478E-AE1D-8F7100738FB4}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.UI.LocaleGenerator", "src\Ryujinx.UI.LocaleGenerator\Ryujinx.UI.LocaleGenerator.csproj", "{77D01AD9-2C98-478E-AE1D-8F7100738FB4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Ryujinx.Horizon.Common", "src\Ryujinx.Horizon.Common\Ryujinx.Horizon.Common.csproj", "{77F96ECE-4952-42DB-A528-DED25572A573}"
EndProject
Expand Down
16 changes: 8 additions & 8 deletions src/Ryujinx.Ava/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
using Ryujinx.Ava.UI.Windows;
using Ryujinx.Common;
using Ryujinx.Common.Logging;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.Common.Configuration;
using Ryujinx.UI.Common.Helper;
using System;
using System.Diagnostics;

Expand Down Expand Up @@ -42,9 +42,9 @@ public override void OnFrameworkInitializationCompleted()
{
ApplyConfiguredTheme();

ConfigurationState.Instance.Ui.BaseStyle.Event += ThemeChanged_Event;
ConfigurationState.Instance.Ui.CustomThemePath.Event += ThemeChanged_Event;
ConfigurationState.Instance.Ui.EnableCustomTheme.Event += CustomThemeChanged_Event;
ConfigurationState.Instance.UI.BaseStyle.Event += ThemeChanged_Event;
ConfigurationState.Instance.UI.CustomThemePath.Event += ThemeChanged_Event;
ConfigurationState.Instance.UI.EnableCustomTheme.Event += CustomThemeChanged_Event;
}
}

Expand Down Expand Up @@ -88,13 +88,13 @@ private void ApplyConfiguredTheme()
{
try
{
string baseStyle = ConfigurationState.Instance.Ui.BaseStyle;
string baseStyle = ConfigurationState.Instance.UI.BaseStyle;

if (string.IsNullOrWhiteSpace(baseStyle))
{
ConfigurationState.Instance.Ui.BaseStyle.Value = "Dark";
ConfigurationState.Instance.UI.BaseStyle.Value = "Dark";

baseStyle = ConfigurationState.Instance.Ui.BaseStyle;
baseStyle = ConfigurationState.Instance.UI.BaseStyle;
}

RequestedThemeVariant = baseStyle switch
Expand Down
14 changes: 7 additions & 7 deletions src/Ryujinx.Ava/AppHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@
using Ryujinx.HLE.HOS.SystemState;
using Ryujinx.Input;
using Ryujinx.Input.HLE;
using Ryujinx.Ui.App.Common;
using Ryujinx.Ui.Common;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.App.Common;
using Ryujinx.UI.Common;
using Ryujinx.UI.Common.Configuration;
using Ryujinx.UI.Common.Helper;
using Silk.NET.Vulkan;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats.Png;
Expand Down Expand Up @@ -1070,7 +1070,7 @@ private bool UpdateFrame()
case KeyboardHotkeyState.Screenshot:
ScreenshotRequested = true;
break;
case KeyboardHotkeyState.ShowUi:
case KeyboardHotkeyState.ShowUI:
_viewModel.ShowMenuAndStatusBar = !_viewModel.ShowMenuAndStatusBar;
break;
case KeyboardHotkeyState.Pause:
Expand Down Expand Up @@ -1160,9 +1160,9 @@ private KeyboardHotkeyState GetHotkeyState()
{
state = KeyboardHotkeyState.Screenshot;
}
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUi))
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.ShowUI))
{
state = KeyboardHotkeyState.ShowUi;
state = KeyboardHotkeyState.ShowUI;
}
else if (_keyboardInterface.IsPressed((Key)ConfigurationState.Instance.Hid.Hotkeys.Value.Pause))
{
Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/Common/ApplicationHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
using Ryujinx.Common.Logging;
using Ryujinx.HLE.FileSystem;
using Ryujinx.HLE.HOS.Services.Account.Acc;
using Ryujinx.Ui.App.Common;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.App.Common;
using Ryujinx.UI.Common.Helper;
using System;
using System.Buffers;
using System.IO;
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/Common/KeyboardHotkeyState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public enum KeyboardHotkeyState
None,
ToggleVSync,
Screenshot,
ShowUi,
ShowUI,
Pause,
ToggleMute,
ResScaleUp,
Expand Down
6 changes: 3 additions & 3 deletions src/Ryujinx.Ava/Common/Locale/LocaleManager.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Common;
using Ryujinx.Common.Utilities;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.UI.Common.Configuration;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
Expand Down Expand Up @@ -38,9 +38,9 @@ public void Load()
// If the view is loaded with the UI Previewer detached, then override it with the saved one or default.
if (Program.PreviewerDetached)
{
if (!string.IsNullOrEmpty(ConfigurationState.Instance.Ui.LanguageCode.Value))
if (!string.IsNullOrEmpty(ConfigurationState.Instance.UI.LanguageCode.Value))
{
localeLanguageCode = ConfigurationState.Instance.Ui.LanguageCode.Value;
localeLanguageCode = ConfigurationState.Instance.UI.LanguageCode.Value;
}
else
{
Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/Modules/Updater/Updater.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
using Ryujinx.Common;
using Ryujinx.Common.Logging;
using Ryujinx.Common.Utilities;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.Ui.Common.Models.Github;
using Ryujinx.UI.Common.Helper;
using Ryujinx.UI.Common.Models.Github;
using System;
using System.Collections.Generic;
using System.Diagnostics;
Expand Down
8 changes: 4 additions & 4 deletions src/Ryujinx.Ava/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
using Ryujinx.Common.SystemInterop;
using Ryujinx.Modules;
using Ryujinx.SDL2.Common;
using Ryujinx.Ui.Common;
using Ryujinx.Ui.Common.Configuration;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.Ui.Common.SystemInfo;
using Ryujinx.UI.Common;
using Ryujinx.UI.Common.Configuration;
using Ryujinx.UI.Common.Helper;
using Ryujinx.UI.Common.SystemInfo;
using System;
using System.IO;
using System.Runtime.InteropServices;
Expand Down
6 changes: 3 additions & 3 deletions src/Ryujinx.Ava/Ryujinx.Ava.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@
<ProjectReference Include="..\ARMeilleure\ARMeilleure.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.OpenGL\Ryujinx.Graphics.OpenGL.csproj" />
<ProjectReference Include="..\Ryujinx.Graphics.Gpu\Ryujinx.Graphics.Gpu.csproj" />
<ProjectReference Include="..\Ryujinx.Ui.Common\Ryujinx.Ui.Common.csproj" />
<ProjectReference Include="..\Ryujinx.Ui.LocaleGenerator\Ryujinx.Ui.LocaleGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<ProjectReference Include="..\Ryujinx.UI.Common\Ryujinx.UI.Common.csproj" />
<ProjectReference Include="..\Ryujinx.UI.LocaleGenerator\Ryujinx.UI.LocaleGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

<ItemGroup>
Expand Down Expand Up @@ -103,7 +103,7 @@
</ItemGroup>

<ItemGroup>
<AvaloniaResource Include="Ui\**\*.xaml">
<AvaloniaResource Include="UI\**\*.xaml">
<SubType>Designer</SubType>
</AvaloniaResource>
<AvaloniaResource Include="Assets\Fonts\SegoeFluentIcons.ttf" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,26 @@
using Ryujinx.HLE;
using Ryujinx.HLE.HOS.Applets;
using Ryujinx.HLE.HOS.Services.Am.AppletOE.ApplicationProxyService.ApplicationProxy.Types;
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using System;
using System.Threading;

namespace Ryujinx.Ava.UI.Applet
{
internal class AvaHostUiHandler : IHostUiHandler
internal class AvaHostUIHandler : IHostUIHandler
{
private readonly MainWindow _parent;

public IHostUiTheme HostUiTheme { get; }
public IHostUITheme HostUITheme { get; }

public AvaHostUiHandler(MainWindow parent)
public AvaHostUIHandler(MainWindow parent)
{
_parent = parent;

HostUiTheme = new AvaloniaHostUiTheme(parent);
HostUITheme = new AvaloniaHostUITheme(parent);
}

public bool DisplayMessageDialog(ControllerAppletUiArgs args)
public bool DisplayMessageDialog(ControllerAppletUIArgs args)
{
ManualResetEvent dialogCloseEvent = new(false);

Expand Down Expand Up @@ -110,7 +110,7 @@ public bool DisplayMessageDialog(string title, string message)
return okPressed;
}

public bool DisplayInputDialog(SoftwareKeyboardUiArgs args, out string userText)
public bool DisplayInputDialog(SoftwareKeyboardUIArgs args, out string userText)
{
ManualResetEvent dialogCloseEvent = new(false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Ryujinx.Ava.Input;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using System;
using System.Threading;
using HidKey = Ryujinx.Common.Configuration.Hid.Key;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using Avalonia.Media;
using Ryujinx.Ava.UI.Windows;
using Ryujinx.HLE.Ui;
using Ryujinx.HLE.UI;
using System;

namespace Ryujinx.Ava.UI.Applet
{
class AvaloniaHostUiTheme : IHostUiTheme
class AvaloniaHostUITheme : IHostUITheme
{
public AvaloniaHostUiTheme(MainWindow parent)
public AvaloniaHostUITheme(MainWindow parent)
{
FontFamily = OperatingSystem.IsWindows() && OperatingSystem.IsWindowsVersionAtLeast(10, 0, 22000) ? "Segoe UI Variable" : parent.FontFamily.Name;
DefaultBackgroundColor = BrushToThemeColor(parent.Background);
Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/UI/Applet/ControllerAppletDialog.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ internal partial class ControllerAppletDialog : UserControl

private readonly MainWindow _mainWindow;

public ControllerAppletDialog(MainWindow mainWindow, ControllerAppletUiArgs args)
public ControllerAppletDialog(MainWindow mainWindow, ControllerAppletUIArgs args)
{
if (args.PlayerCountMin == args.PlayerCountMax)
{
Expand Down Expand Up @@ -69,7 +69,7 @@ public ControllerAppletDialog(MainWindow mainWindow)
InitializeComponent();
}

public static async Task<UserResult> ShowControllerAppletDialog(MainWindow window, ControllerAppletUiArgs args)
public static async Task<UserResult> ShowControllerAppletDialog(MainWindow window, ControllerAppletUIArgs args)
{
ContentDialog contentDialog = new();
UserResult result = UserResult.Cancel;
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Applet/ErrorAppletWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
Height="80"
MinWidth="50"
Margin="5,10,20,10"
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
Source="resm:Ryujinx.UI.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.UI.Common" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Applet/SwkbdAppletDialog.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
MinWidth="50"
Margin="5,10,20,10"
VerticalAlignment="Center"
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
Source="resm:Ryujinx.UI.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.UI.Common" />
<TextBlock
Grid.Row="1"
Grid.Column="1"
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Applet/SwkbdAppletDialog.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected override void OnGotFocus(GotFocusEventArgs e)
public string MainText { get; set; } = "";
public string SecondaryText { get; set; } = "";

public static async Task<(UserResult Result, string Input)> ShowInputDialog(string title, SoftwareKeyboardUiArgs args)
public static async Task<(UserResult Result, string Input)> ShowInputDialog(string title, SoftwareKeyboardUIArgs args)
{
ContentDialog contentDialog = new();

Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/UI/Controls/ApplicationContextMenu.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
using Ryujinx.Ava.UI.Windows;
using Ryujinx.Common.Configuration;
using Ryujinx.HLE.HOS;
using Ryujinx.Ui.App.Common;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.App.Common;
using Ryujinx.UI.Common.Helper;
using System;
using System.Collections.Generic;
using System.Globalization;
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Controls/ApplicationGridView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Avalonia.Interactivity;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ui.App.Common;
using Ryujinx.UI.App.Common;
using System;

namespace Ryujinx.Ava.UI.Controls
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Controls/ApplicationListView.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using Avalonia.Interactivity;
using Ryujinx.Ava.UI.Helpers;
using Ryujinx.Ava.UI.ViewModels;
using Ryujinx.Ui.App.Common;
using Ryujinx.UI.App.Common;
using System;

namespace Ryujinx.Ava.UI.Controls
Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/UI/Controls/UpdateWaitWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
Height="70"
MinWidth="50"
Margin="5,10,20,10"
Source="resm:Ryujinx.Ui.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.Ui.Common" />
Source="resm:Ryujinx.UI.Common.Resources.Logo_Ryujinx.png?assembly=Ryujinx.UI.Common" />
<StackPanel
Grid.Row="1"
Grid.Column="1"
Expand All @@ -39,4 +39,4 @@
VerticalAlignment="Center" />
</StackPanel>
</Grid>
</Window>
</Window>
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Helpers/ApplicationOpenedEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Avalonia.Interactivity;
using Ryujinx.Ui.App.Common;
using Ryujinx.UI.App.Common;

namespace Ryujinx.Ava.UI.Helpers
{
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Helpers/ContentDialogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ async Task<ContentDialogResult> ShowDialog()
{
result = ContentDialogResult.None;

Logger.Warning?.Print(LogClass.Ui, "Content dialog overlay failed to populate. Default value has been returned.");
Logger.Warning?.Print(LogClass.UI, "Content dialog overlay failed to populate. Default value has been returned.");
}

return result;
Expand Down
2 changes: 1 addition & 1 deletion src/Ryujinx.Ava/UI/Helpers/LocalizedNeverConverter.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using Avalonia.Data.Converters;
using Avalonia.Markup.Xaml;
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.Common.Helper;
using System;
using System.Globalization;

Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/UI/Helpers/LoggerAdapter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ public bool IsEnabled(AvaLogLevel level, string area)

public void Log(AvaLogLevel level, string area, object source, string messageTemplate)
{
GetLog(level)?.PrintMsg(RyuLogClass.Ui, Format(level, area, messageTemplate, source, null));
GetLog(level)?.PrintMsg(RyuLogClass.UI, Format(level, area, messageTemplate, source, null));
}

public void Log(AvaLogLevel level, string area, object source, string messageTemplate, params object[] propertyValues)
{
GetLog(level)?.PrintMsg(RyuLogClass.Ui, Format(level, area, messageTemplate, source, propertyValues));
GetLog(level)?.PrintMsg(RyuLogClass.UI, Format(level, area, messageTemplate, source, propertyValues));
}

private static string Format(AvaLogLevel level, string area, string template, object source, object[] v)
Expand Down
4 changes: 2 additions & 2 deletions src/Ryujinx.Ava/UI/Helpers/UserErrorDialog.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Ryujinx.Ava.Common.Locale;
using Ryujinx.Ui.Common;
using Ryujinx.Ui.Common.Helper;
using Ryujinx.UI.Common;
using Ryujinx.UI.Common.Helper;
using System.Threading.Tasks;

namespace Ryujinx.Ava.UI.Helpers
Expand Down
Loading

0 comments on commit f06d22d

Please sign in to comment.