Fixes the wml_dialogs with wide screen theme.

Fixes bug #20592, applies patch #3844.