зеркало из https://github.com/mozilla/pjs.git
Update to latest raptor code
This commit is contained in:
Родитель
aa6ce3e043
Коммит
4209480c98
|
@ -334,13 +334,15 @@ nsEventStatus nsCalDayViewCanvas :: PaintForeground(nsIRenderingContext& aRender
|
|||
* we need to generalize this.
|
||||
*/
|
||||
psBuf = pEvent->toStringFmt(usFmt).toCString("");
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y,0);
|
||||
nsString string = psBuf;
|
||||
aRenderingContext.DrawString(string,rect.x+1,rect.y,0);
|
||||
delete psBuf;
|
||||
|
||||
if (rect.height > (2 * fm_height))
|
||||
{
|
||||
psBuf = pEvent->getSummary().toCString("");
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y+fm_height,0);
|
||||
string = psBuf;
|
||||
aRenderingContext.DrawString(string,rect.x+1,rect.y+fm_height,0);
|
||||
delete psBuf;
|
||||
}
|
||||
}
|
||||
|
@ -391,13 +393,15 @@ nsEventStatus nsCalDayViewCanvas :: PaintForeground(nsIRenderingContext& aRender
|
|||
* we need to generalize this.
|
||||
*/
|
||||
psBuf = pEvent->toStringFmt(usFmt).toCString("");
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y,0);
|
||||
nsString string = psBuf;
|
||||
aRenderingContext.DrawString(string,rect.x+1,rect.y,0);
|
||||
delete psBuf;
|
||||
|
||||
if (rect.height > (2 * fm_height))
|
||||
{
|
||||
psBuf = pEvent->getSummary().toCString("");
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),rect.x+1,rect.y+fm_height,0);
|
||||
string = psBuf;
|
||||
aRenderingContext.DrawString(string,rect.x+1,rect.y+fm_height,0);
|
||||
delete psBuf;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -257,14 +257,16 @@ nsEventStatus nsCalMonthViewCanvas :: PaintForeground(nsIRenderingContext& aRend
|
|||
psBuf = pEvent->toStringFmt(usFmt).toCString("");
|
||||
|
||||
aRenderingContext.SetColor(NS_RGB(255,255,255));
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),bounds.x+1,bounds.y,0);
|
||||
nsString string = psBuf;
|
||||
aRenderingContext.DrawString(string,bounds.x+1,bounds.y,0);
|
||||
|
||||
delete psBuf;
|
||||
|
||||
if (bounds.height > (2 * fm_height))
|
||||
{
|
||||
psBuf = pEvent->getSummary().toCString("");
|
||||
aRenderingContext.DrawString(psBuf,nsCRT::strlen(psBuf),bounds.x+1,bounds.y+fm_height,0);
|
||||
string = psBuf;
|
||||
aRenderingContext.DrawString(string,bounds.x+1,bounds.y+fm_height,0);
|
||||
delete psBuf;
|
||||
}
|
||||
}
|
||||
|
@ -443,7 +445,8 @@ nsEventStatus nsCalMonthViewCanvas :: PaintCellBackground( PRUint32& aCellRow, P
|
|||
|
||||
aRenderingContext.SetColor(GetForegroundColor());
|
||||
|
||||
aRenderingContext.DrawString(strDate,nsCRT::strlen(strDate),x,y,0);
|
||||
nsString string = strDate;
|
||||
aRenderingContext.DrawString(string,x,y,0);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -218,7 +218,9 @@ nsresult nsCalTimebarScale :: DrawTime(nsIRenderingContext& aContext,
|
|||
x = aRect.x + (INSET << 1);
|
||||
y = aRect.y + (INSET << 1);
|
||||
|
||||
aContext.DrawString(text,nsCRT::strlen(text),x,y,0);
|
||||
nsString string = text;
|
||||
|
||||
aContext.DrawString(string,x,y,0);
|
||||
|
||||
return (NS_OK);
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ nsEventStatus nsCalTimebarTimeHeading :: PaintForeground(nsIRenderingContext& aR
|
|||
y = ((rect.height - height)>>1)+rect.y;
|
||||
|
||||
aRenderingContext.SetColor(GetForegroundColor());
|
||||
aRenderingContext.DrawString(*string,nsCRT::strlen(*string),x,y,0);
|
||||
aRenderingContext.DrawString(*string,x,y,0);
|
||||
|
||||
aRenderingContext.PopState();
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ nsEventStatus nsCalTimebarUserHeading :: PaintForeground(nsIRenderingContext& aR
|
|||
y = ((rect.height - height)>>1)+rect.y;
|
||||
|
||||
aRenderingContext.SetColor(GetForegroundColor());
|
||||
aRenderingContext.DrawString(mUserName,mUserName.Length(),x,y,0);
|
||||
aRenderingContext.DrawString(mUserName,x,y,0);
|
||||
|
||||
return nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
|
|
@ -941,7 +941,10 @@ nsresult nsXPFCCanvas :: SetBounds(const nsRect &aBounds)
|
|||
|
||||
if (mView != nsnull)
|
||||
{
|
||||
gXPFCToolkit->GetViewManager()->MoveViewTo(mView, mBounds.x, mBounds.y);
|
||||
nsIView *parent;
|
||||
mView->GetParent(parent);
|
||||
|
||||
if (parent) gXPFCToolkit->GetViewManager()->MoveViewTo(mView, mBounds.x, mBounds.y);
|
||||
gXPFCToolkit->GetViewManager()->ResizeView(mView, mBounds.width, mBounds.height);
|
||||
|
||||
nsIWidget * widget = nsnull;
|
||||
|
@ -1442,12 +1445,12 @@ nsEventStatus nsXPFCCanvas :: HandleEvent(nsGUIEvent *aEvent)
|
|||
rect.width = ((nsPaintEvent *)aEvent)->rect->width;
|
||||
rect.height = ((nsPaintEvent *)aEvent)->rect->height;
|
||||
|
||||
ds = ctx->CreateDrawingSurface(&rect);
|
||||
ds = ctx->CreateDrawingSurface(&rect,nsnull);
|
||||
ctx->SelectOffScreenDrawingSurface(ds);
|
||||
|
||||
es = OnPaint((*((nsPaintEvent*)aEvent)->renderingContext),(*((nsPaintEvent*)aEvent)->rect));
|
||||
|
||||
ctx->CopyOffScreenBits(rect);
|
||||
ctx->CopyOffScreenBits(ds, rect.x, rect.y, rect,nsnull);
|
||||
ctx->DestroyDrawingSurface(ds);
|
||||
|
||||
return es;
|
||||
|
|
|
@ -310,7 +310,7 @@ nsEventStatus nsXPButton :: PaintForeground(nsIRenderingContext& aRenderingConte
|
|||
|
||||
}
|
||||
|
||||
aRenderingContext.DrawString(string,string.Length(),x,y,0);
|
||||
aRenderingContext.DrawString(string,x,y,0);
|
||||
|
||||
return nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ nsEventStatus nsXPItem :: PaintForeground(nsIRenderingContext& aRenderingContext
|
|||
|
||||
}
|
||||
|
||||
aRenderingContext.DrawString(string,string.Length(),x,y,0);
|
||||
aRenderingContext.DrawString(string,x,y,0);
|
||||
|
||||
return nsEventStatus_eConsumeNoDefault;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче