Theme setting logic.