Implementing screen dimming feature