Skip to content

Commit

Permalink
Revert "Fixed bug with drawing themed cells (Issue JAM-Software#549)"
Browse files Browse the repository at this point in the history
This reverts commit e2c63fd.
  • Loading branch information
None authored and None committed Oct 8, 2016
1 parent e2c63fd commit 9004cc8
Showing 1 changed file with 14 additions and 18 deletions.
32 changes: 14 additions & 18 deletions Source/VirtualTrees.pas
Expand Up @@ -21491,8 +21491,7 @@ procedure TBaseVirtualTree.DrawDottedHLine(const PaintInfo: TVTPaintInfo; Left,
begin
Brush.Color := FColors.BackGroundColor;
R := Rect(Min(Left, Right), Top, Max(Left, Right) + 1, Top + 1);
Winapi.Windows.FillRect(Handle, R, FDottedBrush
);
Winapi.Windows.FillRect(Handle, R, FDottedBrush);
end;
end;

Expand All @@ -21516,7 +21515,7 @@ procedure TBaseVirtualTree.DrawDottedVLine(const PaintInfo: TVTPaintInfo; Top, B
Brush.Color := FColors.UnfocusedSelectionColor;
end
else
Brush.Color := FColors.BackGroundColor;
Brush.Color := FColors.BackGroundColor;
R := Rect(Left, Min(Top, Bottom), Left + 1, Max(Top, Bottom) + 1);
Winapi.Windows.FillRect(Handle, R, FDottedBrush);
end;
Expand Down Expand Up @@ -23885,10 +23884,7 @@ procedure TBaseVirtualTree.PaintCheckImage(Canvas: TCanvas; const ImageInfo: TVT
lSize := TSize.Create(GetSystemMetrics(SM_CXMENUCHECK), GetSystemMetrics(SM_CYMENUCHECK));
end;//if
R := Rect(XPos, YPos, XPos + lSize.cx, YPos + lSize.cy);

StyleServices.DrawElement(Canvas.Handle, Details, R);
Canvas.Refresh;

if Index in [21..24] then
UtilityImages.Draw(Canvas, XPos, YPos, 4); //Does anyone know what this was good for?
end
Expand Down Expand Up @@ -24362,7 +24358,8 @@ procedure TBaseVirtualTree.PrepareCell(var PaintInfo: TVTPaintInfo; WindowOrgX,
begin
Brush.Color := FColors.UnfocusedSelectionColor;
Pen.Color := FColors.UnfocusedSelectionBorderColor;
end;
end;

if (toGridExtensions in FOptions.FMiscOptions) or (toFullRowSelect in FOptions.FSelectionOptions) then
InnerRect := CellRect;
if not IsRectEmpty(InnerRect) then
Expand Down Expand Up @@ -32864,18 +32861,17 @@ procedure TVTEdit.WMKeyDown(var Message: TWMKeyDown);

// get edit options for column as priority. If column has toDefaultEdit
// use global edit options for tree
EditOptions := Tree.TreeOptions.EditOptions; // default
ColumnCandidate := -1;
if Tree.Header.Columns.Count > 0 then // are there any columns?
begin
Column := Tree.Header.Columns[Tree.FocusedColumn];
if Column.EditOptions <> toDefaultEdit then
EditOptions := Column.EditOptions;
Column := Tree.Header.Columns[Tree.FocusedColumn];
if Column.EditOptions <> toDefaultEdit then
EditOptions := Column.EditOptions
else
EditOptions := Tree.TreeOptions.EditOptions;

// next column candidate for toVerticalEdit and toHorizontalEdit
if Column.EditNextColumn <> -1 then
ColumnCandidate := Column.EditNextColumn;
end;
// next column candidate for toVerticalEdit and toHorizontalEdit
if Column.EditNextColumn <> -1 then
ColumnCandidate := Column.EditNextColumn
else
ColumnCandidate := -1;

case EditOptions of
toDefaultEdit: Tree.SetFocus;
Expand Down

0 comments on commit 9004cc8

Please sign in to comment.