You've already forked lazarus-ccr
* Use Brush.Color instead of Color to handle clDefault
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1378 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -8037,7 +8037,7 @@ begin
|
|||||||
if NewWidth > OldWidth then
|
if NewWidth > OldWidth then
|
||||||
begin
|
begin
|
||||||
R := ScrollRect;
|
R := ScrollRect;
|
||||||
NewBrush := CreateSolidBrush(ColorToRGB(Color));
|
NewBrush := CreateSolidBrush(ColorToRGB(Brush.Color));
|
||||||
LastBrush := SelectObject(DC, NewBrush);
|
LastBrush := SelectObject(DC, NewBrush);
|
||||||
R.Right := R.Left + DX;
|
R.Right := R.Left + DX;
|
||||||
FillRect(DC, R, NewBrush);
|
FillRect(DC, R, NewBrush);
|
||||||
@ -12067,7 +12067,7 @@ begin
|
|||||||
with PaintInfo do
|
with PaintInfo do
|
||||||
begin
|
begin
|
||||||
EraseAction := eaDefault;
|
EraseAction := eaDefault;
|
||||||
BackColor := Color;
|
BackColor := Brush.Color;
|
||||||
if Floating then
|
if Floating then
|
||||||
begin
|
begin
|
||||||
Offset := Point(-FEffectiveOffsetX, R.Top);
|
Offset := Point(-FEffectiveOffsetX, R.Top);
|
||||||
@ -12102,7 +12102,7 @@ begin
|
|||||||
//clear the node background
|
//clear the node background
|
||||||
//note there's a bug in original VTV that can lead to wrong node paint
|
//note there's a bug in original VTV that can lead to wrong node paint
|
||||||
//so, here the node is always cleared even if is selected
|
//so, here the node is always cleared even if is selected
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
FillRect(R);
|
FillRect(R);
|
||||||
{$ifdef DEBUG_VTV}Logger.SendColor([lcPaintDetails],'Clearing a node background - Brush.Color', Brush.Color);{$endif}
|
{$ifdef DEBUG_VTV}Logger.SendColor([lcPaintDetails],'Clearing a node background - Brush.Color', Brush.Color);{$endif}
|
||||||
{$ifdef DEBUG_VTV}Logger.Send([lcPaintDetails],'Clearing Rectangle (R)', R);{$endif}
|
{$ifdef DEBUG_VTV}Logger.Send([lcPaintDetails],'Clearing Rectangle (R)', R);{$endif}
|
||||||
@ -13261,7 +13261,7 @@ const
|
|||||||
if not (coParentColor in FHeader.FColumns[FHeader.FMainColumn].FOptions) then
|
if not (coParentColor in FHeader.FColumns[FHeader.FMainColumn].FOptions) then
|
||||||
Brush.Color := FHeader.FColumns[FHeader.FMainColumn].Color
|
Brush.Color := FHeader.FColumns[FHeader.FMainColumn].Color
|
||||||
else
|
else
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -13323,7 +13323,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
case FButtonFillMode of
|
case FButtonFillMode of
|
||||||
fmTreeColor:
|
fmTreeColor:
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
fmWindowColor:
|
fmWindowColor:
|
||||||
Brush.Color := clWindow;
|
Brush.Color := clWindow;
|
||||||
end;
|
end;
|
||||||
@ -13359,7 +13359,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
case FButtonFillMode of
|
case FButtonFillMode of
|
||||||
fmTreeColor:
|
fmTreeColor:
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
fmWindowColor:
|
fmWindowColor:
|
||||||
Brush.Color := clWindow;
|
Brush.Color := clWindow;
|
||||||
end;
|
end;
|
||||||
@ -14395,7 +14395,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
// clear background
|
// clear background
|
||||||
Target.Brush.Color := Color;
|
Target.Brush.Color := Brush.Color;
|
||||||
Target.FillRect(R);
|
Target.FillRect(R);
|
||||||
|
|
||||||
// Picture rect in relation to client viewscreen.
|
// Picture rect in relation to client viewscreen.
|
||||||
@ -20037,7 +20037,7 @@ var
|
|||||||
begin
|
begin
|
||||||
with PaintInfo, Canvas do
|
with PaintInfo, Canvas do
|
||||||
begin
|
begin
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
R := Rect(Min(Left, Right), Top, Max(Left, Right) + 1, Top + 1);
|
R := Rect(Min(Left, Right), Top, Max(Left, Right) + 1, Top + 1);
|
||||||
LCLIntf.FillRect(Handle, R, FDottedBrush);
|
LCLIntf.FillRect(Handle, R, FDottedBrush);
|
||||||
end;
|
end;
|
||||||
@ -20055,7 +20055,7 @@ var
|
|||||||
begin
|
begin
|
||||||
with PaintInfo, Canvas do
|
with PaintInfo, Canvas do
|
||||||
begin
|
begin
|
||||||
Brush.Color := Self.Color;
|
Brush.Color := Self.Brush.Color;
|
||||||
R := Rect(Left, Min(Top, Bottom), Left + 1, Max(Top, Bottom) + 1);
|
R := Rect(Left, Min(Top, Bottom), Left + 1, Max(Top, Bottom) + 1);
|
||||||
LCLIntf.FillRect(Handle, R, FDottedBrush);
|
LCLIntf.FillRect(Handle, R, FDottedBrush);
|
||||||
end;
|
end;
|
||||||
@ -28685,7 +28685,7 @@ begin
|
|||||||
if not (coParentColor in Items[FirstColumn].FOptions) then
|
if not (coParentColor in Items[FirstColumn].FOptions) then
|
||||||
NodeBitmap.Canvas.Brush.Color := Items[FirstColumn].FColor
|
NodeBitmap.Canvas.Brush.Color := Items[FirstColumn].FColor
|
||||||
else
|
else
|
||||||
NodeBitmap.Canvas.Brush.Color := Color;
|
NodeBitmap.Canvas.Brush.Color := Brush.Color;
|
||||||
|
|
||||||
NodeBitmap.Canvas.FillRect(R);
|
NodeBitmap.Canvas.FillRect(R);
|
||||||
FirstColumn := GetNextVisibleColumn(FirstColumn);
|
FirstColumn := GetNextVisibleColumn(FirstColumn);
|
||||||
@ -28706,7 +28706,7 @@ begin
|
|||||||
(toFullVertGridLines in FOptions.FPaintOptions) and (toShowVertGridLines in FOptions.FPaintOptions) and
|
(toFullVertGridLines in FOptions.FPaintOptions) and (toShowVertGridLines in FOptions.FPaintOptions) and
|
||||||
(not (hoAutoResize in FHeader.FOptions)) then
|
(not (hoAutoResize in FHeader.FOptions)) then
|
||||||
Inc(R.Left);
|
Inc(R.Left);
|
||||||
NodeBitmap.Canvas.Brush.Color := Color;
|
NodeBitmap.Canvas.Brush.Color := Brush.Color;
|
||||||
NodeBitmap.Canvas.FillRect(R);
|
NodeBitmap.Canvas.FillRect(R);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -28718,7 +28718,7 @@ begin
|
|||||||
{$ifdef DEBUG_VTV}Logger.Send([lcPaintDetails],'TargetRect',TargetRect);{$endif}
|
{$ifdef DEBUG_VTV}Logger.Send([lcPaintDetails],'TargetRect',TargetRect);{$endif}
|
||||||
// No columns nor bitmap background. Simply erase it with the tree color.
|
// No columns nor bitmap background. Simply erase it with the tree color.
|
||||||
SetWindowOrgEx(NodeBitmap.Canvas.Handle, 0, 0, nil);
|
SetWindowOrgEx(NodeBitmap.Canvas.Handle, 0, 0, nil);
|
||||||
NodeBitmap.Canvas.Brush.Color := Color;
|
NodeBitmap.Canvas.Brush.Color := Brush.Color;
|
||||||
NodeBitmap.Canvas.FillRect(TargetRect);
|
NodeBitmap.Canvas.FillRect(TargetRect);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -28844,7 +28844,7 @@ begin
|
|||||||
Height := TreeRect.Bottom - TreeRect.Top;
|
Height := TreeRect.Bottom - TreeRect.Top;
|
||||||
// Erase the entire image with the color key value, for the case not everything
|
// Erase the entire image with the color key value, for the case not everything
|
||||||
// in the image is covered by the tree image.
|
// in the image is covered by the tree image.
|
||||||
Canvas.Brush.Color := Color;
|
Canvas.Brush.Color := Brush.Color;
|
||||||
Canvas.FillRect(Rect(0, 0, Width, Height));
|
Canvas.FillRect(Rect(0, 0, Width, Height));
|
||||||
|
|
||||||
PaintOptions := [poDrawSelection, poSelectedOnly];
|
PaintOptions := [poDrawSelection, poSelectedOnly];
|
||||||
@ -28857,7 +28857,7 @@ begin
|
|||||||
ImagePos := ClientToScreen(TreeRect.TopLeft);
|
ImagePos := ClientToScreen(TreeRect.TopLeft);
|
||||||
HotSpot := ClientToScreen(HotSpot);
|
HotSpot := ClientToScreen(HotSpot);
|
||||||
|
|
||||||
FDragImage.ColorKey := Color;
|
FDragImage.ColorKey := Brush.Color;
|
||||||
FDragImage.PrepareDrag(Image, ImagePos, HotSpot, DataObject);
|
FDragImage.PrepareDrag(Image, ImagePos, HotSpot, DataObject);
|
||||||
finally
|
finally
|
||||||
Image.Free;
|
Image.Free;
|
||||||
@ -29677,7 +29677,8 @@ var
|
|||||||
begin
|
begin
|
||||||
Window := Handle;
|
Window := Handle;
|
||||||
DC := GetDC(Handle);
|
DC := GetDC(Handle);
|
||||||
Self.Brush.Color := Color;
|
//lcl: setting Color to Brush seems not necessary
|
||||||
|
//Self.Brush.Color := Color;
|
||||||
Brush := Self.Brush.Reference.Handle;
|
Brush := Self.Brush.Reference.Handle;
|
||||||
|
|
||||||
if (Mode1 <> tamNoScroll) and (Mode2 <> tamNoScroll) then
|
if (Mode1 <> tamNoScroll) and (Mode2 <> tamNoScroll) then
|
||||||
|
Reference in New Issue
Block a user