stop native listboxes from drawing outside their frame. part 1 of the fix for this bug. b=382142 sr=pav

This commit is contained in:
joshmoz@gmail.com 2007-08-28 00:21:04 -07:00
Родитель 9da2aba3ad
Коммит 517ebeaffa
1 изменённых файлов: 8 добавлений и 0 удалений

Просмотреть файл

@ -258,6 +258,14 @@ nsNativeThemeCocoa::DrawFrame(CGContextRef cgContext, HIThemeFrameKind inKind,
drawRect.size.width -= frameOutset * 2;
drawRect.size.height -= frameOutset * 2;
}
else if (inKind == kHIThemeFrameListBox) {
SInt32 frameOutset = 0;
::GetThemeMetric(kThemeMetricListBoxFrameOutset, &frameOutset);
drawRect.origin.x += frameOutset;
drawRect.origin.y += frameOutset;
drawRect.size.width -= frameOutset * 2;
drawRect.size.height -= frameOutset * 2;
}
#if DRAW_IN_FRAME_DEBUG
CGContextSetRGBFillColor(cgContext, 0.0, 0.0, 0.5, 0.8);