зеркало из https://github.com/mozilla/pjs.git
fixed some sizing issues
This commit is contained in:
Родитель
0879f85bb3
Коммит
c11eb42e04
|
@ -22,7 +22,7 @@
|
||||||
#include "nsWidgetsCID.h"
|
#include "nsWidgetsCID.h"
|
||||||
#include <LPeriodical.h>
|
#include <LPeriodical.h>
|
||||||
|
|
||||||
//#define DRAW_ON_RESIZE
|
#define DRAW_ON_RESIZE
|
||||||
|
|
||||||
#define IsUserWindow(wp) (wp && ((((WindowPeek)wp)->windowKind) >= userKind))
|
#define IsUserWindow(wp) (wp && ((((WindowPeek)wp)->windowKind) >= userKind))
|
||||||
|
|
||||||
|
@ -202,8 +202,6 @@ nsPaintEvent pevent;
|
||||||
if(thewindow != nsnull)
|
if(thewindow != nsnull)
|
||||||
{
|
{
|
||||||
updateregion = whichwindow->visRgn;
|
updateregion = whichwindow->visRgn;
|
||||||
thewindow->DoPaintWidgets(updateregion);
|
|
||||||
|
|
||||||
Rect bounds = (**updateregion).rgnBBox;
|
Rect bounds = (**updateregion).rgnBBox;
|
||||||
rect.x = bounds.left;
|
rect.x = bounds.left;
|
||||||
rect.y = bounds.top;
|
rect.y = bounds.top;
|
||||||
|
@ -219,6 +217,9 @@ nsPaintEvent pevent;
|
||||||
pevent.rect = ▭
|
pevent.rect = ▭
|
||||||
pevent.time = 0;
|
pevent.time = 0;
|
||||||
thewindow->OnPaint(pevent);
|
thewindow->OnPaint(pevent);
|
||||||
|
|
||||||
|
// take care of the childern
|
||||||
|
thewindow->DoPaintWidgets(updateregion);
|
||||||
}
|
}
|
||||||
EndUpdate(whichwindow);
|
EndUpdate(whichwindow);
|
||||||
}
|
}
|
||||||
|
@ -325,6 +326,7 @@ Point newPt;
|
||||||
therect.top += 20; /* Allow space for menu bar */
|
therect.top += 20; /* Allow space for menu bar */
|
||||||
DragWindow(whichwindow, aTheEvent->where, &therect);
|
DragWindow(whichwindow, aTheEvent->where, &therect);
|
||||||
therect = whichwindow->portRect;
|
therect = whichwindow->portRect;
|
||||||
|
thewindow = (nsWindow *) GetWRefCon (whichwindow);
|
||||||
if (thewindow != nsnull)
|
if (thewindow != nsnull)
|
||||||
{
|
{
|
||||||
LocalToGlobal(&topLeft(therect));
|
LocalToGlobal(&topLeft(therect));
|
||||||
|
@ -387,8 +389,8 @@ Point newPt;
|
||||||
event.widget = thewindow;
|
event.widget = thewindow;
|
||||||
thewindow->DispatchEvent(&event);
|
thewindow->DispatchEvent(&event);
|
||||||
|
|
||||||
//thewindow->DoResizeWidgets(sizeevent);
|
//thewindow->DoResizeWidgets(event);
|
||||||
//result = thewindow->OnResize(sizeevent);
|
//result = thewindow->OnResize(event);
|
||||||
//::InvalRect(&therect);
|
//::InvalRect(&therect);
|
||||||
}
|
}
|
||||||
#ifdef DRAW_ON_RESIZE
|
#ifdef DRAW_ON_RESIZE
|
||||||
|
|
Загрузка…
Ссылка в новой задаче