Changeset 234 for trunk/Forms


Ignore:
Timestamp:
Jan 25, 2025, 10:36:28 PM (4 weeks ago)
Author:
chronos
Message:
  • Fixed: Workaround to show checkboxes on Qt5 in import sources and acronym categories.
Location:
trunk/Forms
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/FormAcronyms.pas

    r230 r234  
    150150  TempEntry: TAcronymEntry;
    151151  Meaning: TAcronymMeaning;
    152   I: Integer;
    153152  FormAcronym: TFormAcronym;
    154153begin
     
    182181  TempCategories: TStringList;
    183182  Meaning: TAcronymMeaning;
    184   I: Integer;
    185183  FormAcronym: TFormAcronym;
    186184begin
  • trunk/Forms/FormCategories.lfm

    r230 r234  
    7070      Action = ARemove
    7171    end
     72    object ToolButton4: TToolButton
     73      Left = 106
     74      Top = 2
     75      Action = AEnable
     76    end
     77    object ToolButton5: TToolButton
     78      Left = 141
     79      Top = 2
     80      Action = ADisable
     81    end
    7282  end
    7383  object ActionList1: TActionList
     
    100110    object AEnable: TAction
    101111      Caption = 'Enable'
     112      ImageIndex = 24
    102113      OnExecute = AEnableExecute
    103114    end
    104115    object ADisable: TAction
    105116      Caption = 'Disable'
     117      ImageIndex = 23
    106118      OnExecute = ADisableExecute
    107119    end
  • trunk/Forms/FormCategories.pas

    r231 r234  
    3333    ToolButton2: TToolButton;
    3434    ToolButton3: TToolButton;
     35    ToolButton4: TToolButton;
     36    ToolButton5: TToolButton;
    3537    procedure AAddExecute(Sender: TObject);
    3638    procedure ADisableExecute(Sender: TObject);
     
    178180  for I := 0 to ToolBar1.ButtonCount - 1 do
    179181    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     182  {$IFDEF LCLQt5}
     183  ListViewCategories.Checkboxes := False;
     184  ListViewCategories.StateImages := ActionList1.Images;
     185  {$ENDIF}
    180186end;
    181187
     
    189195    Item.SubItems.Add(IntToStr(GetImportSourcesCount));
    190196    Item.Checked := Enabled;
     197    if Enabled then Item.StateIndex := 24 else
     198      Item.StateIndex := 23;
    191199  end;
    192200end;
  • trunk/Forms/FormImportSources.lfm

    r230 r234  
    4949      Action = APreview
    5050    end
     51    object ToolButton6: TToolButton
     52      Left = 176
     53      Top = 2
     54      Action = AEnable
     55    end
     56    object ToolButton7: TToolButton
     57      Left = 211
     58      Top = 2
     59      Action = ADisable
     60    end
    5161  end
    5262  object ListView1: TListView
     
    139149    object AEnable: TAction
    140150      Caption = 'Enable'
     151      ImageIndex = 24
    141152      OnExecute = AEnableExecute
    142153    end
    143154    object ADisable: TAction
    144155      Caption = 'Disable'
     156      ImageIndex = 23
    145157      OnExecute = ADisableExecute
    146158    end
  • trunk/Forms/FormImportSources.pas

    r230 r234  
    4040    ToolButton4: TToolButton;
    4141    ToolButton5: TToolButton;
     42    ToolButton6: TToolButton;
     43    ToolButton7: TToolButton;
    4244    procedure AAddExecute(Sender: TObject);
    4345    procedure ADisableExecute(Sender: TObject);
     
    106108    Item.SubItems.Add(Format.Name);
    107109    Item.Checked := Enabled;
     110    if Enabled then Item.StateIndex := 24 else
     111      Item.StateIndex := 23;
    108112  end;
    109113end;
     
    386390  for I := 0 to ToolBar1.ButtonCount - 1 do
    387391    ToolBar1.Buttons[I].Hint := ToolBar1.Buttons[I].Caption;
     392  {$IFDEF LCLQt5}
     393  ListView1.Checkboxes := False;
     394  ListView1.StateImages := ActionList1.Images;
     395  {$ENDIF}
    388396end;
    389397
Note: See TracChangeset for help on using the changeset viewer.