I think the length of the shorts is important to mention. Lots of variation there.
For a cosmopolitan city like Bangkok longer shorts are better, preferably at and/or covering the knees (or longer) like American 'board shorts' or European 'capri pants' types. For more casual beach locations like Pattaya or Phuket most anything goes really.
I remember seeing a young Russian couple in Bangkok once wearing extremely short shorts. His were like something an Olympic gymnast would wear, and hers were to the point of being quite
cheeky which garnered quite a few stares

but no complaints.
SL