mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-03 08:06:26 +02:00
[Ryujinx] Address dotnet-format issues (#5395)
* dotnet format style --severity info Some changes were manually reverted. * dotnet format analyzers --serverity info Some changes have been minimally adapted. * Restore a few unused methods and variables * Address dotnet format CA1816 warnings * Address or silence dotnet format CA2208 warnings * Address or silence dotnet format CA1806 and a few CA1854 warnings * Address dotnet format CA1822 warnings * Make dotnet format succeed in style mode * Address dotnet format CA2208 warnings properly * Address most dotnet format whitespace warnings * Apply dotnet format whitespace formatting A few of them have been manually reverted and the corresponding warning was silenced * Format if-blocks correctly * Another rebase, another dotnet format run * Run dotnet format whitespace after rebase * Run dotnet format after rebase and remove unused usings - analyzers - style - whitespace * Add comments to disabled warnings * Simplify properties and array initialization, Use const when possible, Remove trailing commas * Revert "Simplify properties and array initialization, Use const when possible, Remove trailing commas" This reverts commit 9462e4136c0a2100dc28b20cf9542e06790aa67e. * dotnet format whitespace after rebase * First dotnet format pass * Fix build issues * Apply suggestions from code review Co-authored-by: Ac_K <Acoustik666@gmail.com> * Second dotnet format pass * Update src/Ryujinx/Modules/Updater/Updater.cs Co-authored-by: Ac_K <Acoustik666@gmail.com> * Add trailing commas and improve formatting * Fix formatting and naming issues * Rename nvStutterWorkaround to nvidiaStutterWorkaround * Use using declarations and extend resource lifetimes * Fix GTK issues * Add formatting for generated files * Add trailing commas --------- Co-authored-by: Ac_K <Acoustik666@gmail.com>
This commit is contained in:
parent
02b5c7ea89
commit
0684b00b3c
39 changed files with 1891 additions and 1830 deletions
|
@ -1,45 +1,43 @@
|
|||
using Gtk;
|
||||
using Pango;
|
||||
using System;
|
||||
|
||||
namespace Ryujinx.Ui.Windows
|
||||
{
|
||||
public partial class UserProfilesManagerWindow : Window
|
||||
{
|
||||
private Box _mainBox;
|
||||
private Label _selectedLabel;
|
||||
private Box _selectedUserBox;
|
||||
private Image _selectedUserImage;
|
||||
private VBox _selectedUserInfoBox;
|
||||
private Entry _selectedUserNameEntry;
|
||||
private Label _selectedUserIdLabel;
|
||||
private VBox _selectedUserButtonsBox;
|
||||
private Button _saveProfileNameButton;
|
||||
private Button _changeProfileImageButton;
|
||||
private Box _usersTreeViewBox;
|
||||
private Label _availableUsersLabel;
|
||||
private Box _mainBox;
|
||||
private Label _selectedLabel;
|
||||
private Box _selectedUserBox;
|
||||
private Image _selectedUserImage;
|
||||
private Box _selectedUserInfoBox;
|
||||
private Entry _selectedUserNameEntry;
|
||||
private Label _selectedUserIdLabel;
|
||||
private Box _selectedUserButtonsBox;
|
||||
private Button _saveProfileNameButton;
|
||||
private Button _changeProfileImageButton;
|
||||
private Box _usersTreeViewBox;
|
||||
private Label _availableUsersLabel;
|
||||
private ScrolledWindow _usersTreeViewWindow;
|
||||
private ListStore _tableStore;
|
||||
private TreeView _usersTreeView;
|
||||
private Box _bottomBox;
|
||||
private Button _addButton;
|
||||
private Button _deleteButton;
|
||||
private Button _closeButton;
|
||||
private ListStore _tableStore;
|
||||
private TreeView _usersTreeView;
|
||||
private Box _bottomBox;
|
||||
private Button _addButton;
|
||||
private Button _deleteButton;
|
||||
private Button _closeButton;
|
||||
|
||||
private void InitializeComponent()
|
||||
{
|
||||
|
||||
#pragma warning disable CS0612
|
||||
|
||||
//
|
||||
// UserProfilesManagerWindow
|
||||
//
|
||||
CanFocus = false;
|
||||
Resizable = false;
|
||||
Modal = true;
|
||||
CanFocus = false;
|
||||
Resizable = false;
|
||||
Modal = true;
|
||||
WindowPosition = WindowPosition.Center;
|
||||
DefaultWidth = 620;
|
||||
DefaultHeight = 548;
|
||||
TypeHint = Gdk.WindowTypeHint.Dialog;
|
||||
DefaultWidth = 620;
|
||||
DefaultHeight = 548;
|
||||
TypeHint = Gdk.WindowTypeHint.Dialog;
|
||||
|
||||
//
|
||||
// _mainBox
|
||||
|
@ -51,9 +49,9 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_selectedLabel = new Label("Selected User Profile:")
|
||||
{
|
||||
Margin = 15,
|
||||
Margin = 15,
|
||||
Attributes = new AttrList(),
|
||||
Halign = Align.Start
|
||||
Halign = Align.Start,
|
||||
};
|
||||
_selectedLabel.Attributes.Insert(new Pango.AttrWeight(Weight.Bold));
|
||||
|
||||
|
@ -67,7 +65,7 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_selectedUserBox = new Box(Orientation.Horizontal, 0)
|
||||
{
|
||||
MarginLeft = 30
|
||||
MarginStart = 30,
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -78,15 +76,18 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
// _selectedUserInfoBox
|
||||
//
|
||||
_selectedUserInfoBox = new VBox(true, 0);
|
||||
_selectedUserInfoBox = new Box(Orientation.Vertical, 0)
|
||||
{
|
||||
Homogeneous = true,
|
||||
};
|
||||
|
||||
//
|
||||
// _selectedUserNameEntry
|
||||
//
|
||||
_selectedUserNameEntry = new Entry("")
|
||||
{
|
||||
MarginLeft = 15,
|
||||
MaxLength = (int)MaxProfileNameLength
|
||||
MarginStart = 15,
|
||||
MaxLength = (int)MaxProfileNameLength,
|
||||
};
|
||||
_selectedUserNameEntry.KeyReleaseEvent += SelectedUserNameEntry_KeyReleaseEvent;
|
||||
|
||||
|
@ -95,16 +96,16 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_selectedUserIdLabel = new Label("")
|
||||
{
|
||||
MarginTop = 15,
|
||||
MarginLeft = 15
|
||||
MarginTop = 15,
|
||||
MarginStart = 15,
|
||||
};
|
||||
|
||||
//
|
||||
// _selectedUserButtonsBox
|
||||
//
|
||||
_selectedUserButtonsBox = new VBox()
|
||||
_selectedUserButtonsBox = new Box(Orientation.Vertical, 0)
|
||||
{
|
||||
MarginRight = 30
|
||||
MarginEnd = 30,
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -112,10 +113,10 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_saveProfileNameButton = new Button()
|
||||
{
|
||||
Label = "Save Profile Name",
|
||||
CanFocus = true,
|
||||
Label = "Save Profile Name",
|
||||
CanFocus = true,
|
||||
ReceivesDefault = true,
|
||||
Sensitive = false
|
||||
Sensitive = false,
|
||||
};
|
||||
_saveProfileNameButton.Clicked += EditProfileNameButton_Pressed;
|
||||
|
||||
|
@ -124,10 +125,10 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_changeProfileImageButton = new Button()
|
||||
{
|
||||
Label = "Change Profile Image",
|
||||
CanFocus = true,
|
||||
Label = "Change Profile Image",
|
||||
CanFocus = true,
|
||||
ReceivesDefault = true,
|
||||
MarginTop = 10
|
||||
MarginTop = 10,
|
||||
};
|
||||
_changeProfileImageButton.Clicked += ChangeProfileImageButton_Pressed;
|
||||
|
||||
|
@ -136,9 +137,9 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_availableUsersLabel = new Label("Available User Profiles:")
|
||||
{
|
||||
Margin = 15,
|
||||
Margin = 15,
|
||||
Attributes = new AttrList(),
|
||||
Halign = Align.Start
|
||||
Halign = Align.Start,
|
||||
};
|
||||
_availableUsersLabel.Attributes.Insert(new Pango.AttrWeight(Weight.Bold));
|
||||
|
||||
|
@ -147,12 +148,12 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_usersTreeViewWindow = new ScrolledWindow()
|
||||
{
|
||||
ShadowType = ShadowType.In,
|
||||
CanFocus = true,
|
||||
Expand = true,
|
||||
MarginLeft = 30,
|
||||
MarginRight = 30,
|
||||
MarginBottom = 15
|
||||
ShadowType = ShadowType.In,
|
||||
CanFocus = true,
|
||||
Expand = true,
|
||||
MarginStart = 30,
|
||||
MarginEnd = 30,
|
||||
MarginBottom = 15,
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -175,9 +176,9 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_bottomBox = new Box(Orientation.Horizontal, 0)
|
||||
{
|
||||
MarginLeft = 30,
|
||||
MarginRight = 30,
|
||||
MarginBottom = 15
|
||||
MarginStart = 30,
|
||||
MarginEnd = 30,
|
||||
MarginBottom = 15,
|
||||
};
|
||||
|
||||
//
|
||||
|
@ -185,10 +186,10 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_addButton = new Button()
|
||||
{
|
||||
Label = "Add New Profile",
|
||||
CanFocus = true,
|
||||
Label = "Add New Profile",
|
||||
CanFocus = true,
|
||||
ReceivesDefault = true,
|
||||
HeightRequest = 35
|
||||
HeightRequest = 35,
|
||||
};
|
||||
_addButton.Clicked += AddButton_Pressed;
|
||||
|
||||
|
@ -197,11 +198,11 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_deleteButton = new Button()
|
||||
{
|
||||
Label = "Delete Selected Profile",
|
||||
CanFocus = true,
|
||||
Label = "Delete Selected Profile",
|
||||
CanFocus = true,
|
||||
ReceivesDefault = true,
|
||||
HeightRequest = 35,
|
||||
MarginLeft = 10
|
||||
HeightRequest = 35,
|
||||
MarginStart = 10,
|
||||
};
|
||||
_deleteButton.Clicked += DeleteButton_Pressed;
|
||||
|
||||
|
@ -210,16 +211,14 @@ namespace Ryujinx.Ui.Windows
|
|||
//
|
||||
_closeButton = new Button()
|
||||
{
|
||||
Label = "Close",
|
||||
CanFocus = true,
|
||||
Label = "Close",
|
||||
CanFocus = true,
|
||||
ReceivesDefault = true,
|
||||
HeightRequest = 35,
|
||||
WidthRequest = 80
|
||||
HeightRequest = 35,
|
||||
WidthRequest = 80,
|
||||
};
|
||||
_closeButton.Clicked += CloseButton_Pressed;
|
||||
|
||||
#pragma warning restore CS0612
|
||||
|
||||
ShowComponent();
|
||||
}
|
||||
|
||||
|
@ -253,4 +252,4 @@ namespace Ryujinx.Ui.Windows
|
|||
ShowAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue