Added opacity attribute to resource reading.
Fixed parsing bug with trailing white space.

Ending whitespace made it believe there was an array, so any values was
inserted into an TBValueArray.
Added missing invalidation when making widgets invisible.