Fixed resize bug.
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3401 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
fb4683b51b
commit
8521e52301
1 changed files with 14 additions and 7 deletions
|
@ -315,9 +315,13 @@ void RestoreWindowPos(HWND hwnd) {
|
|||
p.rcNormalPosition.left = 0;
|
||||
p.rcNormalPosition.right = width;
|
||||
}
|
||||
else if(p.rcNormalPosition.right > width || p.rcNormalPosition.left < 0) {
|
||||
p.rcNormalPosition.left = (width - windowWidth)/2;
|
||||
p.rcNormalPosition.right = p.rcNormalPosition.left + windowWidth;
|
||||
else if(p.rcNormalPosition.right > width) {
|
||||
p.rcNormalPosition.left = width - windowWidth;
|
||||
p.rcNormalPosition.right = width;
|
||||
}
|
||||
else if(p.rcNormalPosition.left < 0) {
|
||||
p.rcNormalPosition.left = 0;
|
||||
p.rcNormalPosition.right = windowWidth;
|
||||
}
|
||||
|
||||
windowHeight = p.rcNormalPosition.bottom-p.rcNormalPosition.top;
|
||||
|
@ -325,10 +329,13 @@ void RestoreWindowPos(HWND hwnd) {
|
|||
p.rcNormalPosition.top = 0;
|
||||
p.rcNormalPosition.bottom = height;
|
||||
}
|
||||
else if(p.rcNormalPosition.bottom > height || p.rcNormalPosition.top < 0) {
|
||||
|
||||
p.rcNormalPosition.top = (height - windowHeight)/2;
|
||||
p.rcNormalPosition.bottom = p.rcNormalPosition.top + windowHeight;
|
||||
else if(p.rcNormalPosition.bottom > height) {
|
||||
p.rcNormalPosition.top = height - windowHeight;
|
||||
p.rcNormalPosition.bottom = height;
|
||||
}
|
||||
else if(p.rcNormalPosition.top < 0) {
|
||||
p.rcNormalPosition.top = 0;
|
||||
p.rcNormalPosition.bottom = windowHeight;
|
||||
}
|
||||
|
||||
p.length = sizeof(p);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue