Fix Find/Replace dialog size and auto-shrink to fit screen - #1101
Open
tanish0499 wants to merge 2 commits into
Open
Fix Find/Replace dialog size and auto-shrink to fit screen#1101tanish0499 wants to merge 2 commits into
tanish0499 wants to merge 2 commits into
Conversation
…d saved geometry Existing users may have a persisted geometry larger than their screen (from an older version that let the dialog grow to fit long recent search strings). Clamp the restored size to the available screen area in loadSettings() so it recovers automatically without editing notepadnext.ini.
Owner
|
Hi @tanish0499 I do not see this behavior in the current master branch:
|
Author
|
Hi @dail8859 , Screen.Recording.2026-08-01.at.12.54.59.PM.mp4Screen.Recording.2026-08-01.at.12.48.58.PM.mp4 |
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.

Summary
Fixes the Find/Replace dialog growing to an excessive width. Entering a long string in the Find or Replace combo box expanded the editable combos to fit their content, forcing the whole dialog wider — and that oversized size was persisted, so it reopened huge every time.
Root cause
comboFindandcomboReplaceareeditablewith aMinimumExpandingpolicy and nosizeAdjustPolicy, so their size hint grew to fit the longest content. That width got saved viasaveGeometry()and restored on the next open.Changes
FindReplaceDialog.ui— setsizeAdjustPolicy = AdjustToMinimumContentsLengthWithIconon both combos so their size hint no longer depends on content length. Prevents the problem going forward.FindReplaceDialog.cpp— inloadSettings(), clamp the restored geometry to the available screen size, so users who already have an oversized dialog saved innotepadnext.inirecover automatically.Testing