Fix conditional style management for custom widgets. Change-Id: I252869f88a7ae149cf3c6a62934c9b93655ad87f