Added brightness function to test the dialog class, it works.