Olivia d'Abo's been battling her mega music producer ex-husband for 4 years in divorce court, but it seems well worth the wait ... she made out nice when the dust settled.

"The Wonder Years" star's getting $348k in spousal support from Patrick Leonard over the next 4 years, plus another $141k for her cut of the community property and attorney's fees. Pretty solid considering he asked the court to deny her support.

Olivia also gets half of the dough Leonard made on music he produced during their 10-year marriage, which includes Bon Jovi's 2003 album, "This Left Feels Right."

He gets a house, she gets a house and so on -- but the icing on the cake for d'Abo ... the painting gifted by Roger Waters goes to her.

#Money

ncG1vNJzZmivp6x7tbnZZ5qopV9nfXKCjmppaGthZLyttdWimGackZe8brzAramim5tiuaa7zZqpnWWUnsOwvsKeZKOtlJy6prrTaA%3D%3D