Ignore:
Timestamp:
Jan 17, 2025, 8:00:49 AM (12 days ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Common/Forms/FormList.pas

    r583 r584  
    7272  SRemoveItems = 'Remove items';
    7373  SRemoveItemsQuery = 'Do you want to remove selected items?';
    74   SNew = 'New';
    7574
    7675{ TFormList }
     
    129128  FormItem := TFormItem.Create(Self);
    130129  try
    131     TempEntry.Name := FList.GetNextAvailableName(SNew + ' ' + LowerCase(List.GetName));
     130    TempEntry.Name := FList.GetNextAvailableName(List.GetName);
    132131    FormItem.Item := TempEntry;
    133132    if FormItem.ShowModal = mrOk then begin
     
    204203  ItemFields: TItemFields;
    205204  ItemField: TItemField;
     205  DrawRect: TRect;
    206206begin
    207207  ItemFields := TItem(Item.Data).GetFields;
    208208  try
    209209    ItemField := ItemFields[SubItem];
    210     if ItemField.DataType = dtColor then
    211     with ListView1.Canvas do begin
     210    with ListView1.Canvas do
     211    if ItemField.DataType = dtColor then begin
    212212      Brush.Color := TItem(Item.Data).GetValueColor(ItemField.Index);
    213213      Brush.Style := bsSolid;
    214       FillRect(Item.DisplayRectSubItem(SubItem, drBounds));
    215     end;
     214      DrawRect := Item.DisplayRectSubItem(SubItem, drBounds);
     215      {$IFDEF LCLQT5}
     216      // TODO: Wrong rectangle width on Qt5
     217      if DrawRect.Width > ListView1.Columns[SubItem].Width then
     218        DrawRect.Width := ListView1.Columns[SubItem].Width;
     219      {$ENDIF}
     220      FillRect(DrawRect);
     221      end;
    216222  finally
    217223    ItemFields.Free;
Note: See TracChangeset for help on using the changeset viewer.