Also show aspect ratio of trim region

This commit is contained in:
Kovid Goyal 2021-03-09 21:06:23 +05:30
parent feb2b11822
commit 2eb5af2f8c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -84,9 +84,10 @@ class TrimImage(QDialog):
def selection_area_changed(self, rect):
if rect:
w = int(rect.width())
h = int(rect.height())
text = f'{w}x{h}'
w = rect.width()
h = rect.height()
text = f'{int(w)}x{int(h)}'
text = _('Size: {0} Aspect ratio: {1:.2g}').format(text, w / h)
else:
text = ''
self.tr_sz.setText(text)