styles: refactoring DialogStyleHacks