1. An electronic device comprising: a display panel comprising a plurality of sub-pixels; a distance sensor which senses a viewing distance between the display panel and a user; and a control unit which compares the viewing distance with a first critical distance and controls the display panel based on a result of comparison between the viewing distance and the first critical distance, wherein when the viewing distance is less than the first critical distance, the control unit controls the display panel such that all of the sub-pixels are activated and the display panel displays at a basic resolution, and when the viewing distance is greater than the first critical distance, the control unit controls the display panel such that a first number of sub-pixels are inactivated and the display panel displays at a first resolution lower than the basic resolution.