Make dialog windows resizable - #2
Merged
Merged
Conversation
Closed
There was a problem hiding this comment.
Pull request overview
This PR updates several UUPAssistant dialogs to support resizing by adding WS_SIZEBOX, moving layout logic into OnSize (computed from client dimensions), and enforcing minimum dialog sizes via OnGetMinMaxInfo. It also adjusts initial visibility in the installed-drivers scan dialog so controls only appear when their stage is reached.
Changes:
- Made Install Apps, View Appx Features, Add Drivers (and the installed-OS scan sub-dialog), and Update-from-file dialogs resizable (
WS_SIZEBOX) with responsive layouts (OnSize). - Added minimum sizing constraints (
OnGetMinMaxInfo) for the updated dialogs. - Adjusted the installed-drivers scan dialog to hide/show controls at appropriate stages.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/UUPAssistant/UUPAssistant.h | Declares new OnSize / OnGetMinMaxInfo handlers for affected dialogs. |
| src/UUPAssistant/UpdateDlg.cpp | Adds WS_SIZEBOX, responsive layout in OnSize, and minimum tracking size enforcement. |
| src/UUPAssistant/DriverDlg.cpp | Adds WS_SIZEBOX, responsive layout in OnSize, minimum tracking size, and staged control visibility updates in the scan dialog. |
| src/UUPAssistant/AppDlg.cpp | Adds WS_SIZEBOX, responsive layouts for App dialogs and the Appx Features sub-dialog, plus minimum sizing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+77
to
+81
| SIZE size; | ||
| ForceUnsigned.GetIdealSize(&size); | ||
| ForceUnsigned.MoveWindow(pxUnit, pxUnit * 35, size.cx, size.cy); | ||
| wbp.MoveWindow(ForceUnsigned, pxUnit, nClientHeight - pxUnit * 14, size.cx, size.cy); | ||
| Recurse.GetIdealSize(&size); | ||
| Recurse.MoveWindow(pxUnit, pxUnit * 35 + size.cy, size.cx, size.cy); | ||
| Path.MoveWindow(pxUnit, pxUnit * 43, pxUnit * 50, pxUnit * 2); | ||
| BrowseDir.MoveWindow(pxUnit * 52, pxUnit * 43, pxUnit * 7, pxUnit * 2); | ||
| BrowseFiles.MoveWindow(pxUnit * 54, pxUnit * 46, pxUnit * 5, pxUnit * 2); | ||
| Add.MoveWindow(pxUnit, pxUnit * 46, pxUnit * 5, pxUnit * 2); | ||
| Ring->MoveWindow(pxUnit * 7, pxUnit * 46, pxUnit * 2, pxUnit * 2); | ||
| CenterWindow(Parent); | ||
| wbp.MoveWindow(Recurse, pxUnit, nClientHeight - pxUnit * 14 + size.cy, size.cx, size.cy); |
Comment on lines
+175
to
+178
| wbp.MoveWindow(Remove, pxUnit, nClientHeight - pxUnit * 28, pxUnit * 5, pxUnit * 2); | ||
| if (!ctx.SetupUpdate.Empty() || !ctx.SafeOSUpdate.Empty()) | ||
| wbp.MoveWindow(ViewOtherUpdates, pxUnit * 7, nClientHeight - pxUnit * 28, pxUnit * 8, pxUnit * 2); | ||
| wbp.MoveWindow(FinalPath, pxUnit, nClientHeight - pxUnit * 25, nClientWidth - pxUnit * 12, pxUnit * 9); |
Comment on lines
66
to
+69
| AddDriverFromInstalledOS.SetWindowText(GetString(String_AddDriverFromInstalledOS)); | ||
| ForceUnsigned.SetCheck(ctx.bForceUnsigned); | ||
| Recurse.SetCheck(BST_CHECKED); | ||
| } |
…ementPackage button condition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Made the following dialogs resizable:
What changed:
WS_SIZEBOXto dialogs so they can be resized freely.OnSize, with positions computed from the client area edges instead of hardcoded values, so content scales with the window.OnGetMinMaxInfoto enforce a minimum window size for each dialog.ShowWindow) only when the respective stage is reached.Closes #1