Above snippet will not compile if you are on gtk2. It will compile, when you replace the WriteLn argument by (1+1).
Hm, what's the rule behind that...? It seems I can't get any code to compile in this here context with said condition...
The idea is that when you are on gtk2 the compiler sees the code within the{$IFDEF LCLGTK2}..{$ENDIF}. To test this you can put some faulty code in there, and the compilation will stop here.
What about 'SESSION=Ubuntu', 'XDG_CURRENT_DESKTOP= Unity' or 'UPSTART_JOB=unity7' (environment variables) or any sensible combination as a valid condition for this? Can you possibly confirm that any of these are true as well with the 18.04 Ubuntu you installed, but not for other linux installations?
First of all: I am not a Linux man, so maybe this is far easier than what I am saying...
Anyway, here is the excerpt of the env command in all my Linuxes:
Ubuntu 16.04 (Combobox behaviour as you describe)
SESSION=ubuntu
XDG_CURRENT_DESKTOP=Unity
UPSTART_JOB=Unity7
Ubuntu 18.04 (Combobox behaviour as you describe)
GDMSESSION=ubuntu
XDG_CURRENT_DESKTOP=ubuntu:GNOME
(UPSTART_JOB ... not found)
Ubuntu 20.10 (Combobox behaviour CORRECT! But LCL system colors are not extracted from theme correctly: In dark mode, clWindow is still bright, but the background of TCombobox or TEdit is dark -- what a mess!)
GDMSESSION=ubuntu
XDG_CURRENT_DESKTOP=ubuntu:GNOME
Lubuntu 20.10 (correct, but I was not able to switch into some kind of "dark mode")
DESKTOP_SESSION=Lubuntu
XDG_CURRENT_DESTKOP=LXQt
LMDE 4 Cinnamon (correct theme support)
GDMSESSION=cinnamon
DESKTOP_SESSION=cinnamon
XDG_CURRENT_DESKTOP=X-Cinnamon
My impression is that theme support in the various Linuxes is much more multi-facetted and is not mapped on the LCL system colors. But as I said, I am not a Linux man...