I don't think this is something where codeblocks has influence on.
I feared someone would say something like that.
Thanks for finding that link for me. I did see that before, but did not recognize it beloings to the same issue.
They basically say to add a .gtkrc-2.0 file with some content they give and the "export SWT_GTK3=0" (in case the system uses GTK3).
I just tried it as they described it. Then started CB from the terminal with the exported var. Unfortunately there was no visible change.
I also tried to look for a "theme setting", but the only thing I found was a little app about background colors and Icons. A web search with theme, gkt an treeview spacing did come out quite dry. A bit sad, myriards of material about themes around but nothing mentioning spacing.
Maybe some CB user with Ubuntu with a better spacing can check his theme settings for me.