i managed to solve the issue.
using this modified snippet to get more info:
from PySide.QtGui import QApplication, QIcon, QSystemTrayIcon
import sys, signal
app = QApplication(sys.argv)
QIcon.setThemeName('hicolor')
icon = QIcon.fromTheme('insync-normal')
tray = QSystemTrayIcon(icon)
tray.show()
signal.signal(signal.SIGINT, signal.SIG_DFL)
for path in QIcon.themeSearchPaths():
print "%s/%s" % (path, QIcon.themeName())
sys.exit(app.exec_())
this way i print the paths where the system search for hicolor theme.
In my case it printed:
/home/USERNAME/.icon/hicolor
/home/USERNAME/.icons/hicolor
/usr/share/ubuntu/icons/hicolor
/usr/share/gnome/icons/hicolor
/home/USERNAME/.local/share/flatpak/exports/share/icons/hicolor
/usr/local/share/icons/hicolor
/usr/share/icons/hicolor
/var/lib/snapd/desktop/icons/hicolor
and takes the first folder that exists.
In my case these were all empty but /home/USERNAME/.local/share/flatpak/exports/share/icons/hicolor, since time ago i installed an app using flatpack. Purging flatpack from the system solved the issue (since obviously there were no insync icons there).