refactor the themeprogressbar to base on progressbarstyle