device: show DPI values, not slider, in sliding notification

This commit is contained in:
Peter F. Patel-Schneider 2020-09-30 13:41:53 -04:00
parent 612e8fb4f7
commit 757c731610
1 changed files with 5 additions and 3 deletions

View File

@ -408,9 +408,11 @@ def _feature_dpi_sliding():
def displayNewDpi(self, newDpiIdx): def displayNewDpi(self, newDpiIdx):
if _notify.available: if _notify.available:
reason = f'DPI {self.dpiChoices[newDpiIdx]} [min {self.dpiChoices[0]}, max {self.dpiChoices[-1]}]' reason = 'DPI %d [min %d, max %d]' % (self.dpiChoices[newDpiIdx], self.dpiChoices[0], self.dpiChoices[-1])
asPercentage = int(float(newDpiIdx) / float(len(self.dpiChoices) - 1) * 100.) # if there is a progress percentage then the reason isn't shown
_notify.show(self.device, reason=reason, progress=asPercentage) # asPercentage = int(float(newDpiIdx) / float(len(self.dpiChoices) - 1) * 100.)
# _notify.show(self.device, reason=reason, progress=asPercentage)
_notify.show(self.device, reason=reason)
def handle_keys_event(self, cids): def handle_keys_event(self, cids):
if self.fsmState == 'idle': if self.fsmState == 'idle':