mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08:00
Merge pull request #19382 from crackwitz:highgui-w32-remove-gutter
This commit is contained in:
commit
331f1b9961
@ -1105,26 +1105,20 @@ static void icvScreenToClient( HWND hwnd, RECT* rect )
|
||||
/* Calculatess the window coordinates relative to the upper left corner of the mainhWnd window */
|
||||
static RECT icvCalcWindowRect( CvWindow* window )
|
||||
{
|
||||
const int gutter = 1;
|
||||
RECT crect = { 0 }, trect = { 0 } , rect = { 0 };
|
||||
RECT crect = { 0 }, trect = { 0 }, rect = { 0 };
|
||||
|
||||
assert(window);
|
||||
|
||||
GetClientRect(window->frame, &crect);
|
||||
if(window->toolbar.toolbar)
|
||||
if (window->toolbar.toolbar)
|
||||
{
|
||||
GetWindowRect(window->toolbar.toolbar, &trect);
|
||||
icvScreenToClient(window->frame, &trect);
|
||||
SubtractRect( &rect, &crect, &trect);
|
||||
SubtractRect(&rect, &crect, &trect);
|
||||
}
|
||||
else
|
||||
rect = crect;
|
||||
|
||||
rect.top += gutter;
|
||||
rect.left += gutter;
|
||||
rect.bottom -= gutter;
|
||||
rect.right -= gutter;
|
||||
|
||||
return rect;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user