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

The update permission request dialog is centered and moved to the top #264

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

zvm67
Copy link

@zvm67 zvm67 commented Sep 13, 2023

The AskPermissionDialog dialog for requesting permission becomes more visible if it is placed in the center and at the top of the main program window.
Also *.aps and *.bak files added to ignore for git

…o the top of the window hierarchy.

- *.aps and *.bak files added to ignore
@vslavik
Copy link
Owner

vslavik commented Sep 14, 2023

Also

Please don't do that. One commit should do one thing and should be described well

Also *.aps and *.bak files added to ignore for git

Where do you see any such files and what creates them?

src/ui.cpp Outdated
Comment on lines 1346 to 1349
// center inside parent window
dlg.CentreOnParent();
// to the top
dlg.Raise();
Copy link
Owner

@vslavik vslavik Sep 14, 2023

Choose a reason for hiding this comment

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

I don't think this works — did you actually test it?

See what App::ShowWindow() does, i.e. calls CenterWindowOnHostApplication() — centering on hosting window is significantly more involved, because it's not part of WinSparkle's UI hierarchy.

P.S. Please avoid pointless comments such as "center inside parent window" preceding a call that is literally called "CentreOnParent".

Copy link
Author

Choose a reason for hiding this comment

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

did you actually test it?

I tested this code on a program that centered its main window on the screen. So I mistakenly assumed that the query window AskPermissionDialog was centered inside the application window. In fact, the query window is located in the center of the main display.

CenterWindowOnHostApplication() accomplishes the original intent of centering the request window AskPermissionDialog within the main application window. I fixed this in the next commit.

…main window and rises to the top of the window hierarchy.
@zvm67
Copy link
Author

zvm67 commented Sep 14, 2023

Please don't do that. One commit should do one thing and should be described well

I apologize for two changes in one request. I just didn't want to make an additional request because of two lines.

Where do you see any such files and what creates them?

Files with the ".bak" extension are created by many text editors and utilities (for example, comparison utilities) for backup files.
Files with the ".aps" extension are created by Visual Studio as a binary representation of resources, and in fact, are cache files for the development environment.
Files with these extensions are included in the ".gitignore" file that Visual Studio produces by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants