maximized close case dialog
This commit is contained in:
@@ -26,6 +26,8 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
{
|
||||
public partial class CloseCaseDialogWithTicket : UserControl
|
||||
{
|
||||
private const double MinDialogContentHeightDip = 220d;
|
||||
|
||||
#region Fields & Properties
|
||||
private readonly Dictionary<string, string> _errors = new Dictionary<string, string>();
|
||||
|
||||
@@ -2743,9 +2745,8 @@ namespace FasdDesktopUi.Basics.UserControls
|
||||
if (DialogContentScrollViewer == null)
|
||||
return;
|
||||
|
||||
// Keep dialog usable on very small screens, but allow larger monitors to use space.
|
||||
var clamped = Math.Max(220, Math.Min(900, maxHeight));
|
||||
DialogContentScrollViewer.MaxHeight = clamped;
|
||||
// Keep dialog usable on very small screens; parent window already constrains max size.
|
||||
DialogContentScrollViewer.MaxHeight = Math.Max(MinDialogContentHeightDip, maxHeight);
|
||||
}
|
||||
catch (Exception E)
|
||||
{
|
||||
|
||||
@@ -18,6 +18,8 @@ namespace FasdDesktopUi.Pages.TicketCompletion
|
||||
{
|
||||
public partial class TicketCompletion : Window, IBlurInvoker, INotifyPropertyChanged
|
||||
{
|
||||
private const double WindowWorkingAreaMarginDip = 12d;
|
||||
private const double DialogNonContentReserveDip = 180d;
|
||||
private bool isCanceled = false;
|
||||
|
||||
private bool _WaitForClosing = false;
|
||||
@@ -162,10 +164,10 @@ namespace FasdDesktopUi.Pages.TicketCompletion
|
||||
screen = screen ?? WinForms.Screen.PrimaryScreen;
|
||||
var workingArea = screen?.WorkingArea ?? WinForms.Screen.PrimaryScreen.WorkingArea;
|
||||
var dpiScaleY = VisualTreeHelper.GetDpi(this).DpiScaleY;
|
||||
var maxHeightDip = (workingArea.Height / Math.Max(0.1, dpiScaleY)) - 12;
|
||||
var maxHeightDip = (workingArea.Height / Math.Max(0.1, dpiScaleY)) - WindowWorkingAreaMarginDip;
|
||||
|
||||
MaxHeight = Math.Max(220, maxHeightDip);
|
||||
CloseCaseDialogUc?.SetDialogContentMaxHeight(MaxHeight - 180);
|
||||
CloseCaseDialogUc?.SetDialogContentMaxHeight(MaxHeight - DialogNonContentReserveDip);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user