rordenlab / MRIcroGL

v1.2 GLSL volume rendering. Able to view NIfTI, DICOM, MGH, MHD, NRRD, AFNI format images.

Home Page:https://www.nitrc.org/plugins/mwiki/index.php/mricrogl:MainPage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is it possible to display color rectangle in colormap combo box?

hanayik opened this issue · comments

I think it is possible in pascal/lazarus, but I don't know if that implementation would work cross platform

Here's a reference implementation in NiiVue. I'm just creating a css linear gradient style string by looping over the RGBA nodes in the JSON color map.

Similar to the NiiVue and FSLeyes color drop down widgets

Here is a minimal working solution. It looks fine, but it does not look or act natively: you can not choose between items using the arrow keys, the currently selected item is not actively highlighted. I really like components to look native, so I am not comfortable with this solution.

color_table_combo.zip
color_combo

Its a nice idea, but MRIcroGL strives to use native widgets.