Skip to content
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

Move window for dpi change for goToCenter() #15158

Closed

Conversation

ozone10
Copy link
Contributor

@ozone10 ozone10 commented May 19, 2024

ref #14959

@@ -349,7 +349,9 @@ void FindReplaceDlg::create(int dialogID, bool isRTL, bool msgDestParent, bool t
if (nppGUI._findWindowPos.bottom - nppGUI._findWindowPos.top != 0) // check height against 0 as a test of valid data from config
{
RECT rc = getViewablePositionRect(nppGUI._findWindowPos);
::SetWindowPos(_hSelf, HWND_TOP, rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, swpFlags);
::SetWindowPos(_hSelf, HWND_TOP, rc.left, rc.top, 0, 0, SWP_HIDEWINDOW | SWP_NOSIZE | SWP_NOACTIVATE);
::SetWindowPos(_hSelf, HWND_TOP, 0, 0, _rc.right - _rc.left, _rc.bottom - _rc.top, swpFlags | SWP_NOMOVE);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@donho
currently it resets saved dialog size to min size.
To used saved size, more works need to be done. Like saving unscaled size and than scale it or saving used dpi.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ozone10
I think this behaviour is OK - it's original behaviour.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Upvote: It is a good way to reset position and size of the dialog. Please keep it this way :-)

@ozone10
Copy link
Contributor Author

ozone10 commented May 19, 2024

PR needs testing for hash, run, about, debug, and mainly find dialogs.

@donho donho self-assigned this May 19, 2024
@donho donho closed this in fb086bb May 19, 2024
@ozone10 ozone10 deleted the DpiAdjustDpiForGotoCenter branch May 20, 2024 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants