From fb05409c5d16bbbd9be94325e309aa78ee4a0b1f Mon Sep 17 00:00:00 2001 From: Deterous <138427222+Deterous@users.noreply.github.com> Date: Sun, 29 Dec 2024 01:43:53 +0900 Subject: [PATCH] Minor UI and other fixes (#802) * Wider DIW, rounded message boxes * Don't log drive speed * Change margins * Allow changing DIW size * Revert change to DIW sizing * Change left column size in DIW * Increase textbox ratio in UserInput * Fix non-userinput margins * Allow custom message box to move from image * Change changelist * PS4 pkg date is useless --- CHANGELIST.md | 1 + MPF.Frontend/Tools/PhysicalTool.cs | 21 +--- MPF.Frontend/ViewModels/MainViewModel.cs | 5 +- .../CustomMessageBoxWindow.xaml | 116 +++++++++--------- MPF.UI/UserControls/UserInput.xaml | 2 +- MPF.UI/Windows/DiscInformationWindow.xaml | 25 ++-- MPF.UI/Windows/OptionsWindow.xaml | 2 +- MPF.UI/Windows/RingCodeGuideWindow.xaml | 2 +- 8 files changed, 83 insertions(+), 91 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 9618b7b1..8b28d123 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -145,6 +145,7 @@ - Add pure-getkey output names for PS3CFW - Partially clean up PS3CFW - Wrap some PhysicalTool method calls +- Minor UI and other fixes ### 3.2.4 (2024-11-24) diff --git a/MPF.Frontend/Tools/PhysicalTool.cs b/MPF.Frontend/Tools/PhysicalTool.cs index 0e468342..d28edb49 100644 --- a/MPF.Frontend/Tools/PhysicalTool.cs +++ b/MPF.Frontend/Tools/PhysicalTool.cs @@ -205,8 +205,7 @@ namespace MPF.Frontend.Tools } catch { - // We don't care what the error is - return null; + // We don't care what the error is, assume SYSTEM.CNF doesn't exist } // If the SYSTEM.CNF value can't be found, try PSX.EXE @@ -550,14 +549,7 @@ namespace MPF.Frontend.Tools var appPkgHeader = appPkgHeaderDeserializer.Deserialize(fileStream); if (appPkgHeader != null) - { - byte[] date = BitConverter.GetBytes(appPkgHeader.VersionDate); - if (BitConverter.IsLittleEndian) - Array.Reverse(date); - - string pkgDate = $"{date[0]:X2}{date[1]:X2}-{date[2]:X2}-{date[3]:X2}"; - pkgInfo += $"{appPkgHeader.ContentID} ({pkgDate}, {appPkgHeader.VersionHash:X8})"; - } + pkgInfo += $"{appPkgHeader.ContentID}"; } if (pkgInfo == "") @@ -708,14 +700,7 @@ namespace MPF.Frontend.Tools var appPkgHeader = appPkgHeaderDeserializer.Deserialize(fileStream); if (appPkgHeader != null) - { - byte[] date = BitConverter.GetBytes(appPkgHeader.VersionDate); - if (BitConverter.IsLittleEndian) - Array.Reverse(date); - - string pkgDate = $"{date[0]:X2}{date[1]:X2}-{date[2]:X2}-{date[3]:X2}"; - pkgInfo += $"{appPkgHeader.ContentID} ({pkgDate}, {appPkgHeader.VersionHash:X8})"; - } + pkgInfo += $"{appPkgHeader.ContentID}"; } if (pkgInfo == "") diff --git a/MPF.Frontend/ViewModels/MainViewModel.cs b/MPF.Frontend/ViewModels/MainViewModel.cs index 075e6d87..41ea0027 100644 --- a/MPF.Frontend/ViewModels/MainViewModel.cs +++ b/MPF.Frontend/ViewModels/MainViewModel.cs @@ -2061,10 +2061,7 @@ namespace MPF.Frontend.ViewModels VerboseLogLn($"Supported media speeds: {string.Join(", ", [.. DriveSpeeds.ConvertAll(ds => ds.ToString())])}"); // Set the selected speed - int speed = FrontendTool.GetDefaultSpeedForMediaType(CurrentMediaType, Options); - - VerboseLogLn($"Setting drive speed to: {speed}"); - DriveSpeed = speed; + DriveSpeed = FrontendTool.GetDefaultSpeedForMediaType(CurrentMediaType, Options); } /// diff --git a/MPF.UI/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml b/MPF.UI/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml index 345300a8..74e95290 100644 --- a/MPF.UI/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml +++ b/MPF.UI/External/WPFCustomMessageBox/CustomMessageBoxWindow.xaml @@ -6,73 +6,75 @@ WindowStyle="None" ResizeMode="NoResize" SizeToContent="WidthAndHeight" Title="" MinHeight="155" MaxWidth="470" MinWidth="154" - BorderBrush="DarkGray" BorderThickness="2"> + AllowsTransparency="True" Background="Transparent"> - - - - - - + + + + + + + - - - - - - - - - + + + + + + + + + - - + + - - + + - - - - - - + + + + + + - - + + - - - + + + - - - + + + - - - + + + - - - + + + - + + - + diff --git a/MPF.UI/UserControls/UserInput.xaml b/MPF.UI/UserControls/UserInput.xaml index cdb9f5a5..dc9fc3e0 100644 --- a/MPF.UI/UserControls/UserInput.xaml +++ b/MPF.UI/UserControls/UserInput.xaml @@ -7,7 +7,7 @@ - +