fix: keep the file dialog at the size the user left it - #133
Open
gh-underfoot581 wants to merge 1 commit into
Open
fix: keep the file dialog at the size the user left it#133gh-underfoot581 wants to merge 1 commit into
gh-underfoot581 wants to merge 1 commit into
Conversation
set_next_window_size ran on every frame, so the dialog snapped back to 750x400 the moment a drag-resize ended. Apply the size once per open, and save it to app settings on close so it survives the next open and the next session. The save sits on the shared close path rather than on each individual one, so closing by picking a file counts the same as pressing Cancel.
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.
The file dialog can't be resized.
set_next_window_sizeruns on every frame indraw(), so the window snaps back to 750x400 as soon as a drag-resize ends.show(), so a resize survives the next open and the next sessionfinallyindraw()) rather than on each close site individually, so closing by picking a file behaves the same as pressing Cancelself.openis cleared in five places —_select_file,_confirm_folder_selection, the overwrite-confirm button, and Cancel and the action button in_draw_bottom_bar— and all five pass through thatfinallybeforeimgui.end(), so one call covers them.I've been running this on Windows since May and the dialog keeps its size across opens and across restarts. I haven't exercised it on macOS or Linux.