Conversion settings: show profile screen sizes

Conversion settings: When selecting the input/output profiles, show the
profile screen size along with its description.
This commit is contained in:
Kovid Goyal 2013-06-10 16:28:35 +05:30
parent 30b85e3dcb
commit 26a113a77c

View File

@ -27,7 +27,13 @@ class ProfileModel(QAbstractListModel):
if role == Qt.DisplayRole:
return QVariant(profile.name)
if role in (Qt.ToolTipRole, Qt.StatusTipRole, Qt.WhatsThisRole):
return QVariant(profile.description)
w, h = profile.screen_size
if w >= 10000:
ss = _('unlimited')
else:
ss = _('%d x %d pixels') % (w, h)
ss = _('Screen size: %s') % ss
return QVariant('%s [%s]' % (profile.description, ss))
return NONE
class PageSetupWidget(Widget, Ui_Form):