ソースを参照

Fix 22309edc. Move the virtual image lists back into MainForm because otherwise they don't really work. From https://docwiki.embarcadero.com/RADStudio/Sydney/en/Supporting_high-DPI_images_with_the_Image_Collection_and_Virtual_ImageList_components under Best Practices:

"A TVirtualImageList should always be placed on a form, not a data module." Strange that it doesnt complain when you do this anyway :/

Also improve LightToolbarVirtualImageList: don't actually need design-time auto fill so turn it off in the form and instead on at run time.
Martijn Laan 1 年間 前
コミット
0af429b135

+ 0 - 622
Projects/Src/IDE.ImagesModule.dfm

@@ -1,5 +1,4 @@
 object ImagesModule: TImagesModule
-  OnCreate = DataModuleCreate
   Height = 368
   Width = 656
   object BuildImageList: TImageList
@@ -10368,620 +10367,6 @@ object ImagesModule: TImagesModule
     Left = 96
     Top = 24
   end
-  object ThemedToolbarVirtualImageList: TVirtualImageList
-    AutoFill = True
-    Images = <
-      item
-        CollectionIndex = 0
-        CollectionName = 'document-new'
-        Name = 'document-new'
-      end
-      item
-        CollectionIndex = 1
-        CollectionName = 'folder-open-filled-arrow-down-right'
-        Name = 'folder-open-filled-arrow-down-right'
-      end
-      item
-        CollectionIndex = 2
-        CollectionName = 'save-filled'
-        Name = 'save-filled'
-      end
-      item
-        CollectionIndex = 3
-        CollectionName = 'build'
-        Name = 'build'
-      end
-      item
-        CollectionIndex = 4
-        CollectionName = 'build-cancel-2'
-        Name = 'build-cancel-2'
-      end
-      item
-        CollectionIndex = 5
-        CollectionName = 'debug-start-filled'
-        Name = 'debug-start-filled'
-      end
-      item
-        CollectionIndex = 6
-        CollectionName = 'debug-break-all-filled'
-        Name = 'debug-break-all-filled'
-      end
-      item
-        CollectionIndex = 7
-        CollectionName = 'install'
-        Name = 'install'
-      end
-      item
-        CollectionIndex = 8
-        CollectionName = 'uninstall'
-        Name = 'uninstall'
-      end
-      item
-        CollectionIndex = 9
-        CollectionName = 'button-help'
-        Name = 'button-help'
-      end
-      item
-        CollectionIndex = 10
-        CollectionName = 'debug-stop-filled'
-        Name = 'debug-stop-filled'
-      end
-      item
-        CollectionIndex = 11
-        CollectionName = 'save-as-filled'
-        Name = 'save-as-filled'
-      end
-      item
-        CollectionIndex = 12
-        CollectionName = 'save-all-filled'
-        Name = 'save-all-filled'
-      end
-      item
-        CollectionIndex = 13
-        CollectionName = 'printer'
-        Name = 'printer'
-      end
-      item
-        CollectionIndex = 14
-        CollectionName = 'command-undo-1'
-        Name = 'command-undo-1'
-      end
-      item
-        CollectionIndex = 15
-        CollectionName = 'command-redo-1'
-        Name = 'command-redo-1'
-      end
-      item
-        CollectionIndex = 16
-        CollectionName = 'clipboard-cut'
-        Name = 'clipboard-cut'
-      end
-      item
-        CollectionIndex = 17
-        CollectionName = 'clipboard-copy'
-        Name = 'clipboard-copy'
-      end
-      item
-        CollectionIndex = 18
-        CollectionName = 'clipboard-paste'
-        Name = 'clipboard-paste'
-      end
-      item
-        CollectionIndex = 19
-        CollectionName = 'select-all'
-        Name = 'select-all'
-      end
-      item
-        CollectionIndex = 20
-        CollectionName = 'find'
-        Name = 'find'
-      end
-      item
-        CollectionIndex = 21
-        CollectionName = 'replace'
-        Name = 'replace'
-      end
-      item
-        CollectionIndex = 22
-        CollectionName = 'control-edit'
-        Name = 'control-edit'
-      end
-      item
-        CollectionIndex = 23
-        CollectionName = 'debug-step-into'
-        Name = 'debug-step-into'
-      end
-      item
-        CollectionIndex = 24
-        CollectionName = 'debug-step-over'
-        Name = 'debug-step-over'
-      end
-      item
-        CollectionIndex = 25
-        CollectionName = 'debug-step-out'
-        Name = 'debug-step-out'
-      end
-      item
-        CollectionIndex = 26
-        CollectionName = 'debug-breakpoint-filled'
-        Name = 'debug-breakpoint-filled'
-      end
-      item
-        CollectionIndex = 27
-        CollectionName = 'variables'
-        Name = 'variables'
-      end
-      item
-        CollectionIndex = 28
-        CollectionName = 'heart-filled'
-        Name = 'heart-filled'
-      end
-      item
-        CollectionIndex = 29
-        CollectionName = 'alert-filled'
-        Name = 'alert-filled'
-      end
-      item
-        CollectionIndex = 30
-        CollectionName = 'home'
-        Name = 'home'
-      end
-      item
-        CollectionIndex = 31
-        CollectionName = 'button-info'
-        Name = 'button-info'
-      end
-      item
-        CollectionIndex = 32
-        CollectionName = 'application'
-        Name = 'application'
-      end
-      item
-        CollectionIndex = 33
-        CollectionName = 'folder-open-filled-find'
-        Name = 'folder-open-filled-find'
-      end
-      item
-        CollectionIndex = 34
-        CollectionName = 'gear-filled'
-        Name = 'gear-filled'
-      end
-      item
-        CollectionIndex = 35
-        CollectionName = 'key-filled'
-        Name = 'key-filled'
-      end
-      item
-        CollectionIndex = 36
-        CollectionName = 'unused\letter-a-arrow-right-2'
-        Name = 'unused\letter-a-arrow-right-2'
-      end
-      item
-        CollectionIndex = 37
-        CollectionName = 'symbol-cancel'
-        Name = 'symbol-cancel'
-      end
-      item
-        CollectionIndex = 38
-        CollectionName = 'comment-text-script-filled'
-        Name = 'comment-text-script-filled'
-      end
-      item
-        CollectionIndex = 39
-        CollectionName = 'control-tree-script-filled'
-        Name = 'control-tree-script-filled'
-      end
-      item
-        CollectionIndex = 40
-        CollectionName = 'documents-script-filled'
-        Name = 'documents-script-filled'
-      end
-      item
-        CollectionIndex = 41
-        CollectionName = 'tag-script-filled'
-        Name = 'tag-script-filled'
-      end
-      item
-        CollectionIndex = 42
-        CollectionName = 'control-tab-filled-arrow-left-2'
-        Name = 'control-tab-filled-arrow-left-2'
-      end
-      item
-        CollectionIndex = 43
-        CollectionName = 'control-tab-filled-arrow-right-2'
-        Name = 'control-tab-filled-arrow-right-2'
-      end
-      item
-        CollectionIndex = 44
-        CollectionName = 'unused\control-tab-filled-cancel-2'
-        Name = 'unused\control-tab-filled-cancel-2'
-      end
-      item
-        CollectionIndex = 45
-        CollectionName = 'control-tab-filled-redo-1'
-        Name = 'control-tab-filled-redo-1'
-      end
-      item
-        CollectionIndex = 46
-        CollectionName = 'unused\find-arrow-left-2'
-        Name = 'unused\find-arrow-left-2'
-      end
-      item
-        CollectionIndex = 47
-        CollectionName = 'unused\find-arrow-right-2'
-        Name = 'unused\find-arrow-right-2'
-      end
-      item
-        CollectionIndex = 48
-        CollectionName = 'announcement'
-        Name = 'announcement'
-      end
-      item
-        CollectionIndex = 49
-        CollectionName = 'debug-start-filled-arrow-right-2'
-        Name = 'debug-start-filled-arrow-right-2'
-      end
-      item
-        CollectionIndex = 50
-        CollectionName = 'zoom-in'
-        Name = 'zoom-in'
-      end
-      item
-        CollectionIndex = 51
-        CollectionName = 'zoom-out'
-        Name = 'zoom-out'
-      end
-      item
-        CollectionIndex = 52
-        CollectionName = 'unused\debug-breakpoint-filled-eraser'
-        Name = 'unused\debug-breakpoint-filled-eraser'
-      end
-      item
-        CollectionIndex = 53
-        CollectionName = 'debug-breakpoints-filled-eraser'
-        Name = 'debug-breakpoints-filled-eraser'
-      end
-      item
-        CollectionIndex = 54
-        CollectionName = 'button-arrow-left'
-        Name = 'button-arrow-left'
-      end
-      item
-        CollectionIndex = 55
-        CollectionName = 'button-arrow-right'
-        Name = 'button-arrow-right'
-      end
-      item
-        CollectionIndex = 56
-        CollectionName = 'folder-open-filled'
-        Name = 'folder-open-filled'
-      end
-      item
-        CollectionIndex = 57
-        CollectionName = 'eraser'
-        Name = 'eraser'
-      end
-      item
-        CollectionIndex = 58
-        CollectionName = 'symbol-add'
-        Name = 'symbol-add'
-      end
-      item
-        CollectionIndex = 59
-        CollectionName = 'symbol-remove'
-        Name = 'symbol-remove'
-      end>
-    ImageCollection = LightToolBarImageCollection
-    Left = 520
-    Top = 24
-  end
-  object LightToolbarVirtualImageList: TVirtualImageList
-    AutoFill = True
-    Images = <
-      item
-        CollectionIndex = 0
-        CollectionName = 'document-new'
-        Name = 'document-new'
-      end
-      item
-        CollectionIndex = 1
-        CollectionName = 'folder-open-filled-arrow-down-right'
-        Name = 'folder-open-filled-arrow-down-right'
-      end
-      item
-        CollectionIndex = 2
-        CollectionName = 'save-filled'
-        Name = 'save-filled'
-      end
-      item
-        CollectionIndex = 3
-        CollectionName = 'build'
-        Name = 'build'
-      end
-      item
-        CollectionIndex = 4
-        CollectionName = 'build-cancel-2'
-        Name = 'build-cancel-2'
-      end
-      item
-        CollectionIndex = 5
-        CollectionName = 'debug-start-filled'
-        Name = 'debug-start-filled'
-      end
-      item
-        CollectionIndex = 6
-        CollectionName = 'debug-break-all-filled'
-        Name = 'debug-break-all-filled'
-      end
-      item
-        CollectionIndex = 7
-        CollectionName = 'install'
-        Name = 'install'
-      end
-      item
-        CollectionIndex = 8
-        CollectionName = 'uninstall'
-        Name = 'uninstall'
-      end
-      item
-        CollectionIndex = 9
-        CollectionName = 'button-help'
-        Name = 'button-help'
-      end
-      item
-        CollectionIndex = 10
-        CollectionName = 'debug-stop-filled'
-        Name = 'debug-stop-filled'
-      end
-      item
-        CollectionIndex = 11
-        CollectionName = 'save-as-filled'
-        Name = 'save-as-filled'
-      end
-      item
-        CollectionIndex = 12
-        CollectionName = 'save-all-filled'
-        Name = 'save-all-filled'
-      end
-      item
-        CollectionIndex = 13
-        CollectionName = 'printer'
-        Name = 'printer'
-      end
-      item
-        CollectionIndex = 14
-        CollectionName = 'command-undo-1'
-        Name = 'command-undo-1'
-      end
-      item
-        CollectionIndex = 15
-        CollectionName = 'command-redo-1'
-        Name = 'command-redo-1'
-      end
-      item
-        CollectionIndex = 16
-        CollectionName = 'clipboard-cut'
-        Name = 'clipboard-cut'
-      end
-      item
-        CollectionIndex = 17
-        CollectionName = 'clipboard-copy'
-        Name = 'clipboard-copy'
-      end
-      item
-        CollectionIndex = 18
-        CollectionName = 'clipboard-paste'
-        Name = 'clipboard-paste'
-      end
-      item
-        CollectionIndex = 19
-        CollectionName = 'select-all'
-        Name = 'select-all'
-      end
-      item
-        CollectionIndex = 20
-        CollectionName = 'find'
-        Name = 'find'
-      end
-      item
-        CollectionIndex = 21
-        CollectionName = 'replace'
-        Name = 'replace'
-      end
-      item
-        CollectionIndex = 22
-        CollectionName = 'control-edit'
-        Name = 'control-edit'
-      end
-      item
-        CollectionIndex = 23
-        CollectionName = 'debug-step-into'
-        Name = 'debug-step-into'
-      end
-      item
-        CollectionIndex = 24
-        CollectionName = 'debug-step-over'
-        Name = 'debug-step-over'
-      end
-      item
-        CollectionIndex = 25
-        CollectionName = 'debug-step-out'
-        Name = 'debug-step-out'
-      end
-      item
-        CollectionIndex = 26
-        CollectionName = 'debug-breakpoint-filled'
-        Name = 'debug-breakpoint-filled'
-      end
-      item
-        CollectionIndex = 27
-        CollectionName = 'variables'
-        Name = 'variables'
-      end
-      item
-        CollectionIndex = 28
-        CollectionName = 'heart-filled'
-        Name = 'heart-filled'
-      end
-      item
-        CollectionIndex = 29
-        CollectionName = 'alert-filled'
-        Name = 'alert-filled'
-      end
-      item
-        CollectionIndex = 30
-        CollectionName = 'home'
-        Name = 'home'
-      end
-      item
-        CollectionIndex = 31
-        CollectionName = 'button-info'
-        Name = 'button-info'
-      end
-      item
-        CollectionIndex = 32
-        CollectionName = 'application'
-        Name = 'application'
-      end
-      item
-        CollectionIndex = 33
-        CollectionName = 'folder-open-filled-find'
-        Name = 'folder-open-filled-find'
-      end
-      item
-        CollectionIndex = 34
-        CollectionName = 'gear-filled'
-        Name = 'gear-filled'
-      end
-      item
-        CollectionIndex = 35
-        CollectionName = 'key-filled'
-        Name = 'key-filled'
-      end
-      item
-        CollectionIndex = 36
-        CollectionName = 'unused\letter-a-arrow-right-2'
-        Name = 'unused\letter-a-arrow-right-2'
-      end
-      item
-        CollectionIndex = 37
-        CollectionName = 'symbol-cancel'
-        Name = 'symbol-cancel'
-      end
-      item
-        CollectionIndex = 38
-        CollectionName = 'comment-text-script-filled'
-        Name = 'comment-text-script-filled'
-      end
-      item
-        CollectionIndex = 39
-        CollectionName = 'control-tree-script-filled'
-        Name = 'control-tree-script-filled'
-      end
-      item
-        CollectionIndex = 40
-        CollectionName = 'documents-script-filled'
-        Name = 'documents-script-filled'
-      end
-      item
-        CollectionIndex = 41
-        CollectionName = 'tag-script-filled'
-        Name = 'tag-script-filled'
-      end
-      item
-        CollectionIndex = 42
-        CollectionName = 'control-tab-filled-arrow-left-2'
-        Name = 'control-tab-filled-arrow-left-2'
-      end
-      item
-        CollectionIndex = 43
-        CollectionName = 'control-tab-filled-arrow-right-2'
-        Name = 'control-tab-filled-arrow-right-2'
-      end
-      item
-        CollectionIndex = 44
-        CollectionName = 'unused\control-tab-filled-cancel-2'
-        Name = 'unused\control-tab-filled-cancel-2'
-      end
-      item
-        CollectionIndex = 45
-        CollectionName = 'control-tab-filled-redo-1'
-        Name = 'control-tab-filled-redo-1'
-      end
-      item
-        CollectionIndex = 46
-        CollectionName = 'unused\find-arrow-left-2'
-        Name = 'unused\find-arrow-left-2'
-      end
-      item
-        CollectionIndex = 47
-        CollectionName = 'unused\find-arrow-right-2'
-        Name = 'unused\find-arrow-right-2'
-      end
-      item
-        CollectionIndex = 48
-        CollectionName = 'announcement'
-        Name = 'announcement'
-      end
-      item
-        CollectionIndex = 49
-        CollectionName = 'debug-start-filled-arrow-right-2'
-        Name = 'debug-start-filled-arrow-right-2'
-      end
-      item
-        CollectionIndex = 50
-        CollectionName = 'zoom-in'
-        Name = 'zoom-in'
-      end
-      item
-        CollectionIndex = 51
-        CollectionName = 'zoom-out'
-        Name = 'zoom-out'
-      end
-      item
-        CollectionIndex = 52
-        CollectionName = 'unused\debug-breakpoint-filled-eraser'
-        Name = 'unused\debug-breakpoint-filled-eraser'
-      end
-      item
-        CollectionIndex = 53
-        CollectionName = 'debug-breakpoints-filled-eraser'
-        Name = 'debug-breakpoints-filled-eraser'
-      end
-      item
-        CollectionIndex = 54
-        CollectionName = 'button-arrow-left'
-        Name = 'button-arrow-left'
-      end
-      item
-        CollectionIndex = 55
-        CollectionName = 'button-arrow-right'
-        Name = 'button-arrow-right'
-      end
-      item
-        CollectionIndex = 56
-        CollectionName = 'folder-open-filled'
-        Name = 'folder-open-filled'
-      end
-      item
-        CollectionIndex = 57
-        CollectionName = 'eraser'
-        Name = 'eraser'
-      end
-      item
-        CollectionIndex = 58
-        CollectionName = 'symbol-add'
-        Name = 'symbol-add'
-      end
-      item
-        CollectionIndex = 59
-        CollectionName = 'symbol-remove'
-        Name = 'symbol-remove'
-      end>
-    ImageCollection = LightToolBarImageCollection
-    Left = 96
-    Top = 92
-  end
   object DarkToolBarImageCollection: TImageCollection
     Images = <
       item
@@ -24169,13 +23554,6 @@ object ImagesModule: TImagesModule
     Left = 96
     Top = 195
   end
-  object ThemedMarkersAndACVirtualImageList: TVirtualImageList
-    Images = <>
-    Width = 12
-    Height = 12
-    Left = 520
-    Top = 194
-  end
   object DarkMarkersAndACImageCollection: TImageCollection
     Images = <
       item

+ 1 - 23
Projects/Src/IDE.ImagesModule.pas

@@ -10,15 +10,9 @@ type
   TImagesModule = class(TDataModule)
     BuildImageList: TImageList;
     LightToolBarImageCollection: TImageCollection;
-    ThemedToolbarVirtualImageList: TVirtualImageList;
-    LightToolbarVirtualImageList: TVirtualImageList;
     DarkToolBarImageCollection: TImageCollection;
     LightMarkersAndACImageCollection: TImageCollection;
-    ThemedMarkersAndACVirtualImageList: TVirtualImageList;
     DarkMarkersAndACImageCollection: TImageCollection;
-    procedure DataModuleCreate(Sender: TObject);
-  public
-    procedure UpdateTheme(const Dark: Boolean);
   end;
 
 var
@@ -30,20 +24,4 @@ implementation
 
 {$R *.dfm}
 
-procedure TImagesModule.DataModuleCreate(Sender: TObject);
-begin
-  ThemedMarkersAndACVirtualImageList.AutoFill := True;
-end;
-
-procedure TImagesModule.UpdateTheme(const Dark: Boolean);
-begin
-  if Dark then begin
-    ThemedToolbarVirtualImageList.ImageCollection := DarkToolBarImageCollection;
-    ThemedMarkersAndACVirtualImageList.ImageCollection := DarkMarkersAndACImageCollection;
-  end else begin
-    ThemedToolbarVirtualImageList.ImageCollection := LightToolBarImageCollection;
-    ThemedMarkersAndACVirtualImageList.ImageCollection := LightMarkersAndACImageCollection;
-  end;
-end;
-
-end.
+end.

+ 324 - 4
Projects/Src/IDE.MainForm.dfm

@@ -197,7 +197,7 @@ object MainForm: TMainForm
       Margins.Left = 7
       Margins.Top = 4
       Margins.Bottom = 0
-      Images = ImagesModule.ThemedToolbarVirtualImageList
+      Images = ThemedToolbarVirtualImageList
       ParentShowHint = False
       ShowHint = True
       TabOrder = 0
@@ -895,13 +895,13 @@ object MainForm: TMainForm
   object FindDialog: TFindDialog
     OnFind = FindDialogFind
     Left = 48
-    Top = 152
+    Top = 120
   end
   object ReplaceDialog: TReplaceDialog
     OnFind = FindDialogFind
     OnReplace = ReplaceDialogReplace
     Left = 160
-    Top = 152
+    Top = 120
   end
   object CheckIfRunningTimer: TTimer
     Enabled = False
@@ -910,14 +910,334 @@ object MainForm: TMainForm
     Left = 160
     Top = 64
   end
+  object ThemedToolbarVirtualImageList: TVirtualImageList
+    AutoFill = True
+    Images = <
+      item
+        CollectionIndex = 0
+        CollectionName = 'document-new'
+        Name = 'document-new'
+      end
+      item
+        CollectionIndex = 1
+        CollectionName = 'folder-open-filled-arrow-down-right'
+        Name = 'folder-open-filled-arrow-down-right'
+      end
+      item
+        CollectionIndex = 2
+        CollectionName = 'save-filled'
+        Name = 'save-filled'
+      end
+      item
+        CollectionIndex = 3
+        CollectionName = 'build'
+        Name = 'build'
+      end
+      item
+        CollectionIndex = 4
+        CollectionName = 'build-cancel-2'
+        Name = 'build-cancel-2'
+      end
+      item
+        CollectionIndex = 5
+        CollectionName = 'debug-start-filled'
+        Name = 'debug-start-filled'
+      end
+      item
+        CollectionIndex = 6
+        CollectionName = 'debug-break-all-filled'
+        Name = 'debug-break-all-filled'
+      end
+      item
+        CollectionIndex = 7
+        CollectionName = 'install'
+        Name = 'install'
+      end
+      item
+        CollectionIndex = 8
+        CollectionName = 'uninstall'
+        Name = 'uninstall'
+      end
+      item
+        CollectionIndex = 9
+        CollectionName = 'button-help'
+        Name = 'button-help'
+      end
+      item
+        CollectionIndex = 10
+        CollectionName = 'debug-stop-filled'
+        Name = 'debug-stop-filled'
+      end
+      item
+        CollectionIndex = 11
+        CollectionName = 'save-as-filled'
+        Name = 'save-as-filled'
+      end
+      item
+        CollectionIndex = 12
+        CollectionName = 'save-all-filled'
+        Name = 'save-all-filled'
+      end
+      item
+        CollectionIndex = 13
+        CollectionName = 'printer'
+        Name = 'printer'
+      end
+      item
+        CollectionIndex = 14
+        CollectionName = 'command-undo-1'
+        Name = 'command-undo-1'
+      end
+      item
+        CollectionIndex = 15
+        CollectionName = 'command-redo-1'
+        Name = 'command-redo-1'
+      end
+      item
+        CollectionIndex = 16
+        CollectionName = 'clipboard-cut'
+        Name = 'clipboard-cut'
+      end
+      item
+        CollectionIndex = 17
+        CollectionName = 'clipboard-copy'
+        Name = 'clipboard-copy'
+      end
+      item
+        CollectionIndex = 18
+        CollectionName = 'clipboard-paste'
+        Name = 'clipboard-paste'
+      end
+      item
+        CollectionIndex = 19
+        CollectionName = 'select-all'
+        Name = 'select-all'
+      end
+      item
+        CollectionIndex = 20
+        CollectionName = 'find'
+        Name = 'find'
+      end
+      item
+        CollectionIndex = 21
+        CollectionName = 'replace'
+        Name = 'replace'
+      end
+      item
+        CollectionIndex = 22
+        CollectionName = 'control-edit'
+        Name = 'control-edit'
+      end
+      item
+        CollectionIndex = 23
+        CollectionName = 'debug-step-into'
+        Name = 'debug-step-into'
+      end
+      item
+        CollectionIndex = 24
+        CollectionName = 'debug-step-over'
+        Name = 'debug-step-over'
+      end
+      item
+        CollectionIndex = 25
+        CollectionName = 'debug-step-out'
+        Name = 'debug-step-out'
+      end
+      item
+        CollectionIndex = 26
+        CollectionName = 'debug-breakpoint-filled'
+        Name = 'debug-breakpoint-filled'
+      end
+      item
+        CollectionIndex = 27
+        CollectionName = 'variables'
+        Name = 'variables'
+      end
+      item
+        CollectionIndex = 28
+        CollectionName = 'heart-filled'
+        Name = 'heart-filled'
+      end
+      item
+        CollectionIndex = 29
+        CollectionName = 'alert-filled'
+        Name = 'alert-filled'
+      end
+      item
+        CollectionIndex = 30
+        CollectionName = 'home'
+        Name = 'home'
+      end
+      item
+        CollectionIndex = 31
+        CollectionName = 'button-info'
+        Name = 'button-info'
+      end
+      item
+        CollectionIndex = 32
+        CollectionName = 'application'
+        Name = 'application'
+      end
+      item
+        CollectionIndex = 33
+        CollectionName = 'folder-open-filled-find'
+        Name = 'folder-open-filled-find'
+      end
+      item
+        CollectionIndex = 34
+        CollectionName = 'gear-filled'
+        Name = 'gear-filled'
+      end
+      item
+        CollectionIndex = 35
+        CollectionName = 'key-filled'
+        Name = 'key-filled'
+      end
+      item
+        CollectionIndex = 36
+        CollectionName = 'unused\letter-a-arrow-right-2'
+        Name = 'unused\letter-a-arrow-right-2'
+      end
+      item
+        CollectionIndex = 37
+        CollectionName = 'symbol-cancel'
+        Name = 'symbol-cancel'
+      end
+      item
+        CollectionIndex = 38
+        CollectionName = 'comment-text-script-filled'
+        Name = 'comment-text-script-filled'
+      end
+      item
+        CollectionIndex = 39
+        CollectionName = 'control-tree-script-filled'
+        Name = 'control-tree-script-filled'
+      end
+      item
+        CollectionIndex = 40
+        CollectionName = 'documents-script-filled'
+        Name = 'documents-script-filled'
+      end
+      item
+        CollectionIndex = 41
+        CollectionName = 'tag-script-filled'
+        Name = 'tag-script-filled'
+      end
+      item
+        CollectionIndex = 42
+        CollectionName = 'control-tab-filled-arrow-left-2'
+        Name = 'control-tab-filled-arrow-left-2'
+      end
+      item
+        CollectionIndex = 43
+        CollectionName = 'control-tab-filled-arrow-right-2'
+        Name = 'control-tab-filled-arrow-right-2'
+      end
+      item
+        CollectionIndex = 44
+        CollectionName = 'unused\control-tab-filled-cancel-2'
+        Name = 'unused\control-tab-filled-cancel-2'
+      end
+      item
+        CollectionIndex = 45
+        CollectionName = 'control-tab-filled-redo-1'
+        Name = 'control-tab-filled-redo-1'
+      end
+      item
+        CollectionIndex = 46
+        CollectionName = 'unused\find-arrow-left-2'
+        Name = 'unused\find-arrow-left-2'
+      end
+      item
+        CollectionIndex = 47
+        CollectionName = 'unused\find-arrow-right-2'
+        Name = 'unused\find-arrow-right-2'
+      end
+      item
+        CollectionIndex = 48
+        CollectionName = 'announcement'
+        Name = 'announcement'
+      end
+      item
+        CollectionIndex = 49
+        CollectionName = 'debug-start-filled-arrow-right-2'
+        Name = 'debug-start-filled-arrow-right-2'
+      end
+      item
+        CollectionIndex = 50
+        CollectionName = 'zoom-in'
+        Name = 'zoom-in'
+      end
+      item
+        CollectionIndex = 51
+        CollectionName = 'zoom-out'
+        Name = 'zoom-out'
+      end
+      item
+        CollectionIndex = 52
+        CollectionName = 'unused\debug-breakpoint-filled-eraser'
+        Name = 'unused\debug-breakpoint-filled-eraser'
+      end
+      item
+        CollectionIndex = 53
+        CollectionName = 'debug-breakpoints-filled-eraser'
+        Name = 'debug-breakpoints-filled-eraser'
+      end
+      item
+        CollectionIndex = 54
+        CollectionName = 'button-arrow-left'
+        Name = 'button-arrow-left'
+      end
+      item
+        CollectionIndex = 55
+        CollectionName = 'button-arrow-right'
+        Name = 'button-arrow-right'
+      end
+      item
+        CollectionIndex = 56
+        CollectionName = 'folder-open-filled'
+        Name = 'folder-open-filled'
+      end
+      item
+        CollectionIndex = 57
+        CollectionName = 'eraser'
+        Name = 'eraser'
+      end
+      item
+        CollectionIndex = 58
+        CollectionName = 'symbol-add'
+        Name = 'symbol-add'
+      end
+      item
+        CollectionIndex = 59
+        CollectionName = 'symbol-remove'
+        Name = 'symbol-remove'
+      end>
+    ImageCollection = ImagesModule.LightToolBarImageCollection
+    Left = 80
+    Top = 176
+  end
+  object LightToolbarVirtualImageList: TVirtualImageList
+    Images = <>
+    ImageCollection = ImagesModule.LightToolBarImageCollection
+    Left = 191
+    Top = 197
+  end
   object FindInFilesDialog: TFindDialog
     Options = [frDown, frHideUpDown]
     OnFind = FindInFilesDialogFind
     Left = 272
-    Top = 152
+    Top = 120
   end
   object PrintDialog: TPrintDialog
     Left = 272
     Top = 64
   end
+  object ThemedMarkersAndACVirtualImageList: TVirtualImageList
+    Images = <>
+    Width = 12
+    Height = 12
+    Left = 320
+    Top = 176
+  end
 end

+ 16 - 4
Projects/Src/IDE.MainForm.pas

@@ -199,6 +199,8 @@ type
     HelpButton: TToolButton;
     Bevel1: TBevel;
     TerminateButton: TToolButton;
+    ThemedToolbarVirtualImageList: TVirtualImageList;
+    LightToolbarVirtualImageList: TVirtualImageList;
     POutputListSelectAll: TMenuItem;
     DebugCallStackList: TListBox;
     VDebugCallStack: TMenuItem;
@@ -234,6 +236,7 @@ type
     VReopenTabs2: TMenuItem;
     NavPopupMenu: TMenuItem;
     N23: TMenuItem;
+    ThemedMarkersAndACVirtualImageList: TVirtualImageList;
     ESelectNextOccurrence: TMenuItem;
     ESelectAllOccurrences: TMenuItem;
     BreakPointsPopupMenu: TMenuItem;
@@ -986,6 +989,9 @@ begin
   FMenuDarkBackgroundBrush := TBrush.Create;
   FMenuDarkHotOrSelectedBrush := TBrush.Create;
 
+  LightToolbarVirtualImageList.AutoFill := True;
+  ThemedMarkersAndACVirtualImageList.AutoFill := True;
+
   UpdateThemeData(True);
 
   FMenuBitmaps := TMenuBitmaps.Create;
@@ -3928,7 +3934,7 @@ type
   end;
 
 begin
-  var ImageList := ImagesModule.ThemedMarkersAndACVirtualImageList;
+  var ImageList := ThemedMarkersAndACVirtualImageList;
 
   var DC := CreateCompatibleDC(0);
   if DC <> 0 then begin
@@ -6109,7 +6115,13 @@ begin
   ToolbarPanel.Color := FTheme.Colors[tcToolBack];
   ToolBarPanel.ParentBackground := False;
 
-  ImagesModule.UpdateTheme(FTheme.Dark);
+  if FTheme.Dark then begin
+    ThemedToolbarVirtualImageList.ImageCollection := ImagesModule.DarkToolBarImageCollection;
+    ThemedMarkersAndACVirtualImageList.ImageCollection := ImagesModule.DarkMarkersAndACImageCollection;
+  end else begin
+    ThemedToolbarVirtualImageList.ImageCollection := ImagesModule.LightToolBarImageCollection;
+    ThemedMarkersAndACVirtualImageList.ImageCollection := ImagesModule.LightMarkersAndACImageCollection;
+  end;
 
   UpdateBevel1Visibility;
   UpdateMarginsAndAutoCompleteIcons;
@@ -6135,14 +6147,14 @@ begin
    FlushMenuThemes. So don't call SetPreferredAppMode if FlushMenuThemes is
    missing. }
   if Assigned(SetPreferredAppMode) and Assigned(FlushMenuThemes) then begin
-    FMenuImageList := ImagesModule.ThemedToolbarVirtualImageList;
+    FMenuImageList := ThemedToolbarVirtualImageList;
     if FTheme.Dark then
       SetPreferredAppMode(PAM_FORCEDARK)
     else
       SetPreferredAppMode(PAM_FORCELIGHT);
     FlushMenuThemes;
   end else
-    FMenuImageList := ImagesModule.LightToolbarVirtualImageList;
+    FMenuImageList := LightToolbarVirtualImageList;
 end;
 
 procedure TMainForm.UpdateThemeData(const Open: Boolean);