Bronco Billy (1980), directed by Clint Eastwood.
A minor Eastwood film, but said to be one of his favorites. It's mostly a romantic comedy and a combination of two styles: the plot is pure 1930s screwball comedy (runaway heiress hides out in a moth-eaten Wild West show) but the setting is the hard-luck small town real West. We have the eccentric but warm hearted dirt-kickers (they entertain orphans and mental patients) vs the snotty rich city folk.
It has an unusual moment: a sheriff humiliates Billy but there is no revenge or payback. A cowboy does what he must and moves down the trail. In this case he has to take the abuse to get his man out of jail.
I know a lot of Eastwood fans enjoy hating Sondra Locke, but she's well suited to the role of obnoxiously posh spoiled rich girl with a made up accent. It could have been a specialty.