Device visualiser - (probably) Fixed a NaN crash

General UI - Apply change in default render scale everywhere
Plugin settings - Added restart later option when disabling device providers
Plugin settings - Added support for disabling plugins that failed to load
This commit is contained in:
Robert committed 2020-09-03 19:49:48 +02:00
1 parent 20e6aa1135
commit c98fc51623
8 files changed
+84 -26

No files matched your search

@@ -142,15 +142,14 @@ namespace Artemis.UI.Shared
private static Size ResizeKeepAspect(Size src, double maxWidth, double maxHeight)
{
double scale;
// ??
if (double.IsPositiveInfinity(maxWidth) && !double.IsPositiveInfinity(maxHeight))
scale = maxHeight / src.Height;
else if (!double.IsPositiveInfinity(maxWidth) && double.IsPositiveInfinity(maxHeight))
scale = maxWidth / src.Width;
else if (double.IsPositiveInfinity(maxWidth) && double.IsPositiveInfinity(maxHeight))
return src;
scale = Math.Min(maxWidth / src.Width, maxHeight / src.Height);
else
scale = Math.Min(maxWidth / src.Width, maxHeight / src.Height);
return new Size(src.Width * scale, src.Height * scale);
}
@@ -6,6 +6,9 @@ using Ninject.Parameters;
namespace Artemis.UI.Shared.Services
{
/// <summary>
/// Provides different ways of showing confirmation dialogs and custom dialogs
/// </summary>
public interface IDialogService : IArtemisSharedUIService
{
/// <summary>