-
Notifications
You must be signed in to change notification settings - Fork 268
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
Conversation
…o the top of the window hierarchy. - *.aps and *.bak files added to ignore
Please don't do that. One commit should do one thing and should be described well
Where do you see any such files and what creates them? |
src/ui.cpp
Outdated
// center inside parent window | ||
dlg.CentreOnParent(); | ||
// to the top | ||
dlg.Raise(); |
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
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.
I apologize for two changes in one request. I just didn't want to make an additional request because of two lines.
Files with the ".bak" extension are created by many text editors and utilities (for example, comparison utilities) for backup files. |
Thanks, merged! (I omitted the |
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