Changeset 373 for trunk/Packages


Ignore:
Timestamp:
Jan 2, 2025, 11:17:24 PM (3 weeks ago)
Author:
chronos
Message:
  • Fixed: Color background in players list under Qt5.
Location:
trunk/Packages/Common/Forms
Files:
2 edited

Legend:

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

    r358 r373  
    11object FormList: TFormList
    22  Left = 1040
    3   Height = 300
     3  Height = 360
    44  Top = 540
    5   Width = 400
     5  Width = 480
    66  Caption = 'List'
    7   ClientHeight = 300
    8   ClientWidth = 400
    9   DesignTimePPI = 120
     7  ClientHeight = 360
     8  ClientWidth = 480
     9  DesignTimePPI = 144
    1010  OnCreate = FormCreate
    1111  OnDestroy = FormDestroy
     
    1414  object ListView1: TListView
    1515    Left = 0
    16     Height = 268
     16    Height = 322
    1717    Top = 0
    18     Width = 400
     18    Width = 480
    1919    Align = alClient
    2020    Columns = <   
    2121      item
    2222        Caption = 'Name'
    23         Width = 389
     23        Width = 467
    2424      end>
    2525    MultiSelect = True
     
    4040  object ToolBar1: TToolBar
    4141    Left = 0
    42     Top = 268
    43     Width = 400
     42    Height = 38
     43    Top = 322
     44    Width = 480
    4445    Align = alBottom
    4546    ParentFont = False
     
    5354    end
    5455    object ToolButton2: TToolButton
    55       Left = 30
     56      Left = 36
    5657      Top = 2
    5758      Action = AModify
    5859    end
    5960    object ToolButton3: TToolButton
    60       Left = 59
     61      Left = 71
    6162      Top = 2
    6263      Action = ARemove
    6364    end
    6465    object ToolButton4: TToolButton
    65       Left = 88
     66      Left = 106
    6667      Top = 2
    6768      Action = AClone
     
    6970  end
    7071  object ActionList1: TActionList
    71     Left = 174
    72     Top = 133
     72    Left = 209
     73    Top = 160
    7374    object AAdd: TAction
    7475      Caption = 'Add'
     
    101102  end
    102103  object PopupMenu1: TPopupMenu
    103     Left = 294
    104     Top = 133
     104    Left = 353
     105    Top = 160
    105106    object MenuItem1: TMenuItem
    106107      Action = AAdd
  • 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.