Ignore:
Timestamp:
Jan 2, 2025, 11:17:24 PM (5 days ago)
Author:
chronos
Message:
  • Fixed: Color background in players list under Qt5.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Forms/FormList.pas

    r358 r373  
    204204  ItemFields: TItemFields;
    205205  ItemField: TItemField;
     206  DrawRect: TRect;
    206207begin
    207208  ItemFields := TItem(Item.Data).GetFields;
    208209  try
    209210    ItemField := ItemFields[SubItem];
    210     if ItemField.DataType = dtColor then
    211     with ListView1.Canvas do begin
     211    with ListView1.Canvas do
     212    if ItemField.DataType = dtColor then begin
    212213      Brush.Color := TItem(Item.Data).GetValueColor(ItemField.Index);
    213214      Brush.Style := bsSolid;
    214       FillRect(Item.DisplayRectSubItem(SubItem, drBounds));
    215     end;
     215      DrawRect := Item.DisplayRectSubItem(SubItem, drBounds);
     216      {$IFDEF LCLQT5}
     217      // TODO: Wrong rectangle width on Qt5
     218      if DrawRect.Width > ListView1.Columns[SubItem].Width then
     219        DrawRect.Width := ListView1.Columns[SubItem].Width;
     220      {$ENDIF}
     221      FillRect(DrawRect);
     222      end;
    216223  finally
    217224    ItemFields.Free;
Note: See TracChangeset for help on using the changeset viewer.