Weird-looking menus in Ubuntu 17.10

Since I have set up my system with Ubuntu 17.10 last week, I have been seeing these ugly menus:

Any idea why this is happening and, even more so, how this can be possibly fixed is more than welcome. I have been looking around, but I couldn't figure it out.

This is a bug in the version of Qt used by RStudio, and we're hoping to resolve it when we upgrade (currently planned to be available sometime in 2018).

A workaround is to run RStudio from the command line with:

QT_QPA_PLATFORMTHEME=gtk2 rstudio

(or, you can select a different platform theme if preferred)