Whilst Google has a few references on the topic (most of which date back a couple years ago), some of which do mention some sort of implicit association between white trousers and being gay, I think this belief is no more than an urban legend. I lived in London for a long time, I have several gay friends, and I have never heard them mention this, as well as I have never seen them wear white trousers, or any other item of clothing or accessory, to demonstrate their sexual orientation.
Setting aside the meaninglessness of a statistical sample based on "look around you, how many people are doing so-and-so?", and considering the white trousers hypothesis, the fact that you spent a whole day in London without meeting anyone wearing white trousers either suggests that all the people you came across are heterosexual, or that there might be no such thing as a specific piece of clothing functioning as a marker for sexual orientation. Considering the size and presence of the London gay community, I would put my money on the latter.
Finally, there are several reasons you might have seen nobody wearing white trousers. The first that comes to mind is that because people who own such garments tend to use them in hot seasons. Moreover white trousers often go in and out of fashion cyclically, and you might have had this experience on the wrong year for white trousers fashion-wise. Last but not least there's the good old "being in the wrong place, at the wrong time". Coincidentally you did not meet a single person wearing white trousers, and that's it.