Skip to content

Commit

Permalink
Slight improvement of Fl_WinAPI_Window_Driver::border_width_title_bar…
Browse files Browse the repository at this point in the history
…_height()

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12287 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
  • Loading branch information
Manolo Gouy authored and Manolo Gouy committed Jul 4, 2017
1 parent 9961537 commit 976959c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/drivers/WinAPI/Fl_WinAPI_Window_Driver.cxx
Expand Up @@ -102,10 +102,12 @@ RECT // frame of the decorated window in screen coordinates
if (need_r) {
GetWindowRect(fl_xid(win), &r);
}
bx = (r.right - r.left - int(win->w() * scaling))/2;
RECT rc;
GetClientRect(fl_xid(win), &rc);
bx = (r.right - r.left - rc.right)/2;
if (bx < 1) bx = 1;
by = bx;
bt = r.bottom - r.top - int(win->h() * scaling) - 2 * by;
bt = r.bottom - r.top - rc.bottom - 2 * by;
}
return r;
}
Expand Down

0 comments on commit 976959c

Please sign in to comment.