Set style programmatically. Todo: make this cross-platform.