update self.widget when replaced (so it can be cleared)
color picker style and refactoring