mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-04 02:57:38 +00:00
Bug 569216. Render Cocoa progressbars using RenderTransformedHIThemeControl. r=mstange
This commit is contained in:
parent
8ca1833066
commit
b4728af8b2
@ -1016,6 +1016,14 @@ nsNativeThemeCocoa::DrawFrame(CGContextRef cgContext, HIThemeFrameKind inKind,
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
||||
static void
|
||||
RenderProgress(CGContextRef cgContext, const HIRect& aRenderRect, void* aData)
|
||||
{
|
||||
HIThemeTrackDrawInfo* tdi = (HIThemeTrackDrawInfo*)aData;
|
||||
tdi->bounds = aRenderRect;
|
||||
HIThemeDrawTrack(tdi, NULL, cgContext, kHIThemeOrientationNormal);
|
||||
}
|
||||
|
||||
void
|
||||
nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext, const HIRect& inBoxRect,
|
||||
PRBool inIsIndeterminate, PRBool inIsHorizontal,
|
||||
@ -1040,7 +1048,8 @@ nsNativeThemeCocoa::DrawProgress(CGContextRef cgContext, const HIRect& inBoxRect
|
||||
tdi.trackInfo.progress.phase = PR_IntervalToMilliseconds(PR_IntervalNow()) /
|
||||
milliSecondsPerStep % 16;
|
||||
|
||||
HIThemeDrawTrack(&tdi, NULL, cgContext, HITHEME_ORIENTATION);
|
||||
RenderTransformedHIThemeControl(cgContext, inBoxRect, RenderProgress, &tdi,
|
||||
IsFrameRTL(aFrame));
|
||||
|
||||
NS_OBJC_END_TRY_ABORT_BLOCK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user