The world can seem like a dark place, where No Good Deed Goes Unpunished, where the sinful prosper (for a while) and the brave are humiliated and impoverished. That is, so far, what the character has seen of the world. And yet, there can come a meeting, a moment, where the world proves to the character that things can be right, that the future is worth struggling for, that there is reason enough to bother rising in the morning, and facing life and all its hardships. When that happens, the character takes a level in idealism, and can face the world with renewed faith in the character’s principles and righteousness... though not necessarily with renewed cheerfulness (that's a different trope); in fact, the character can remain quite dour and sour. But you can see that the character stands taller!