mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-30 23:00:21 -04:00
Also show aspect ratio of trim region
This commit is contained in:
parent
feb2b11822
commit
2eb5af2f8c
@ -84,9 +84,10 @@ class TrimImage(QDialog):
|
|||||||
|
|
||||||
def selection_area_changed(self, rect):
|
def selection_area_changed(self, rect):
|
||||||
if rect:
|
if rect:
|
||||||
w = int(rect.width())
|
w = rect.width()
|
||||||
h = int(rect.height())
|
h = rect.height()
|
||||||
text = f'{w}x{h}'
|
text = f'{int(w)}x{int(h)}'
|
||||||
|
text = _('Size: {0} Aspect ratio: {1:.2g}').format(text, w / h)
|
||||||
else:
|
else:
|
||||||
text = ''
|
text = ''
|
||||||
self.tr_sz.setText(text)
|
self.tr_sz.setText(text)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user