carbon: implemented theme tree item drawing. changed highlight colors

git-svn-id: trunk@24852 -
This commit is contained in:
dmitry 2010-04-23 13:56:40 +00:00
parent 2947939f60
commit 92b400b9d8
2 changed files with 32 additions and 19 deletions

View File

@ -19,7 +19,7 @@ uses
// lcl
LCLType, LCLProc, LCLIntf, Graphics, Themes, TmSchema,
// widgetset
CarbonProc, CarbonCanvas;
CarbonProc, CarbonCanvas, CarbonGDIObjects;
type
{ TCarbonThemeServices }
@ -284,8 +284,17 @@ function TCarbonThemeServices.DrawTreeviewElement(DC: TCarbonDeviceContext;
var
ButtonDrawInfo: HIThemeButtonDrawInfo;
LabelRect: HIRect;
b: TCarbonBrush;
begin
if Details.Part in [TVP_GLYPH, TVP_HOTGLYPH] then
case Details.Part of
TVP_TREEITEM:
begin
b:=TCarbonBrush.Create(False);
b.SetColor( ColorToRGB(clHighlight), True);
DC.FillRect(R, b);
b.Free;
end;
TVP_GLYPH, TVP_HOTGLYPH:
begin
ButtonDrawInfo.version := 0;
ButtonDrawInfo.State := GetDrawState(Details);
@ -305,6 +314,7 @@ begin
Result := CGRectToRect(LabelRect);
end;
end;
end;
{------------------------------------------------------------------------------

View File

@ -1908,9 +1908,12 @@ begin
COLOR_APPWORKSPACE:
R := GetThemeBrushAsColor(kThemeBrushUtilityWindowBackgroundActive, Depth, True, C);
COLOR_HIGHLIGHT:
R := GetThemeBrushAsColor(kThemeBrushPrimaryHighlightColor, Depth, True, C);
// kThemeBrushAlternatePrimaryHighlightColor is used as highlight in Finder
R := GetThemeBrushAsColor(kThemeBrushAlternatePrimaryHighlightColor, Depth, True, C);
//R := GetThemeBrushAsColor(kThemeBrushPrimaryHighlightColor, Depth, True, C);
COLOR_HIGHLIGHTTEXT:
R := GetThemeTextColor(kThemeTextColorPushButtonPressed, Depth, True, C);
R := GetThemeTextColor(kThemeTextColorWhite, Depth, True, C);
//R := GetThemeTextColor(kThemeTextColorPushButtonPressed, Depth, True, C);
COLOR_SCROLLBAR, COLOR_BTNFACE:
R := GetThemeBrushAsColor(kThemeBrushButtonFaceActive, Depth, True, C);
COLOR_BTNSHADOW: