mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
E-book viewer: Image popup: Show the image resolution in the popup window's titlebar
This commit is contained in:
parent
71273ba7f7
commit
955f807708
@ -251,7 +251,10 @@ class ImageView(QDialog):
|
|||||||
self.current_image_name = unicode_type(self.current_url.toString(NO_URL_FORMATTING)).rpartition('/')[-1]
|
self.current_image_name = unicode_type(self.current_url.toString(NO_URL_FORMATTING)).rpartition('/')[-1]
|
||||||
except AttributeError:
|
except AttributeError:
|
||||||
self.current_image_name = self.current_url
|
self.current_image_name = self.current_url
|
||||||
title = _('View image: %s')%self.current_image_name
|
reso = ''
|
||||||
|
if self.current_img and not self.current_img.isNull():
|
||||||
|
reso = f'[{self.current_img.width()}x{self.current_img.height()}]'
|
||||||
|
title = _('Image: {name} {resolution}').format(name=self.current_image_name, resolution=reso)
|
||||||
self.setWindowTitle(title)
|
self.setWindowTitle(title)
|
||||||
if use_exec:
|
if use_exec:
|
||||||
self.exec_()
|
self.exec_()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user