norgepaul / TChromeTabs

Comprehensive Delphi implementation of Chrome's tab system
Other
218 stars 78 forks source link

re-opened: Suggestion - Allow setting ImageList for each TChromeTab #78

Closed edwinyzh closed 3 years ago

edwinyzh commented 5 years ago

https://github.com/norgepaul/TChromeTabs/issues/54 was closed and I'm not able to re-open it, so I'm continuing the discussion here. For the answer to the question that caused the close of the original issue, see below (or my last comment in the original issue):

I cannot think of a single component or control in Delphi (built-in or third-party) which has such a feature. It kinda defeats the purpose of the image lists. What happens when two of these lists have different sizes? Do you really want one tab's image to be much larger than the next?

Virtual Treeview has a OnGetImageEx event which allows specifying both the ImageList and ImageIndex values, and it's very helpful.

One of the use case for such a feature for TChromeTabs, for example, you have tabs that represents files or folders on the disk, and you have other tabs that are not files. For 'file tabs' you might want to show the icons of the file system, represented by a standalone TImageList retrieved using SHGetFileInfo, for other non-file tabs, you might want to show icons from another TImageList instance.

You won't be able to achieve the above if you cannot use two separated TImageList

wpostma commented 4 years ago

You should code this and PR the change. Remember to test your change on high dpi systems as well as 96 dpi systems.

I see a lot of internal problems trying to make this work.

edwinyzh commented 4 years ago

You should code this and PR the change. Remember to test your change on high dpi systems as well as 96 dpi systems.

I see a lot of internal problems trying to make this work.

If I ever make the change I'll definitely make the PR.

landrix commented 3 years ago

Have you already made any code changes?

edwinyzh commented 3 years ago

sorry, not yet...I use the current latest version...

Maybe for me the easier option would be just make a unified TImageList ;)

landrix commented 3 years ago

I look at how complicated it is.

landrix commented 3 years ago

each TChromeTab has now

    property CustomImages
    property CustomImagesOverlay
    property CustomImagesSpinnerUpload
    property CustomImagesSpinnerDownload

check https://github.com/norgepaul/TChromeTabs/tree/monitorv2support