Repository navigation
Add Server dialog: scroll the form, pin the buttons, clamp to the work area (#1828) #1829
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -643,4 +643,20 @@ private void CancelButton_Click(object sender, RoutedEventArgs e) | |
| DialogResult = false; | ||
| Close(); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// #1828: SizeToContent growth is top-anchored, so expanding a tall auth panel mid-session can | ||
| /// carry the pinned footer past the bottom of the work area without ever hitting the MaxHeight | ||
| /// clamp - MaxHeight limits total height, not position. When growth pushes the bottom edge | ||
| /// off-screen, pull the window up so the footer stays visible: the SizeToContent-friendly form | ||
| /// of the Dashboard twin's SizeToWorkArea() top-pinning. | ||
| /// </summary> | ||
| private void Dialog_SizeChanged(object sender, SizeChangedEventArgs e) | ||
| { | ||
| var workArea = SystemParameters.WorkArea; | ||
| if (Top + ActualHeight > workArea.Bottom) | ||
| { | ||
| Top = Math.Max(workArea.Top, workArea.Bottom - ActualHeight); | ||
|
Comment on lines
+654
to
+659
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Minor: Not a regression introduced here — it mirrors the Dashboard's |
||
| } | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same note as the Lite copy:
SystemParameters.WorkAreareflects the primary monitor, not necessarily the monitor this dialog is on, so both this handler and theMaxHeightbinding (line 6 in the.xaml) can clamp/reposition against the wrong monitor's bounds on a multi-monitor setup. Inherited from the Dashboard's original pattern rather than a new regression, just flagging since it's the exact class of bug this PR is fixing.