adapt style to view