This comment states that Muslims until the 20th century were much more progressive than today and it is European colonisation that is responsible for Islamism.
How true is this?
Short Answer: While he is correct that the hudud punishment as a tenent of Islamic law was not used near so often prior to the Islamic Revival of the late 20th century, European Colonialism is likely not responsible for its reintroduction as a punishment.
Long Answer: Sharia law is complex subject that I am by no means an expert in, but a brief rendition of it might be that: it is not simply a body of regulations issuing from a government or sovereign as we might imagine laws to be in the West, rather it also deals with ideals of family, spiritualality and the observance of the Islamic faith. To give specifics, the laws do not issue from a singular government but are a composition of fatwas (legal/religious opinions) given by muftis (qualified religious jurists.)
During the Golden age of Islam the four great Caliphates, each to varying extents, practiced the tenants of Sharia law as it was upheld by the muftis of the age. Just as there is much debate as to how contemporary laws can and should be applied so too was there much debate as to how closely the Muslim nations should adhere to the doctrines of the fatwas, and in particular to what extent the Qur'an should factor into the interpretation of laws.
Through many centuries of quasi-legal, religious and philosophical discourse the European tradition of laws emerged as the eminent school of thought in the interpretation and application of sharia law. Muslim nations did away with the more religious specifications of behavior in the home and dictates of a religious and familial life to adopt what we in a modern western context might call "laws." [1]
This is not to say that there were no Muslim nations judiciously practicing all the tenants of sharia law in the centuries prior to the Islamic Revival, but rather that there was merely an eminent tradition of adopting a more European approach.
Some would allege that this new approach was the product of European Colonialism is the Middle East however I am not sure of the Universality of this belief.
However, what is true is that the Islamic revival was not a product of said colonialism.
The Islamic Revival was a return by some Muslim nations to the fundmental traditions of sharia law, discarding the European approach for a much more strict application of the tenants which had been laid out centuries before. Ergo, the return of strict sharia law to the nations which practice it today is a reaction to the historically more European standards of law which had been in place, and likely thus not a itself product of European Colonialism. [2]
[1]Vikør, Knut S. (2014). "Shari'ah". In Emad El-Din Shahin (ed.). The Oxford Encyclopedia of Islam and Politics. Oxford University Press.
[2]Stewart, Devin J. (2013). "Shari'a". In Gerhard Böwering, Patricia Crone (ed.). The Princeton Encyclopedia of Islamic Political Thought. Princeton University Press
While it doesn't answer all of your question, here at least is a response by u/PaxOttomanica in another thread that talks about homosexuality in the Islamic Ottoman Empire and briefly touches on how Europe affected their views: