OS X: Fix a regression that caused incorrect display of the icon in popup message boxes when using a Retina display. Fixes #1635999 [Warning dialog box image too large and distorted](https://bugs.launchpad.net/calibre/+bug/1635999)

This commit is contained in:
Kovid Goyal 2016-10-24 14:09:48 +05:30
parent 06bf7d258a
commit 4c8843c98f

View File

@ -30,7 +30,7 @@ class MessageBox(QDialog): # {{{
self.gridLayout = l = QGridLayout(self) self.gridLayout = l = QGridLayout(self)
l.setObjectName("gridLayout") l.setObjectName("gridLayout")
self.icon_label = la = QLabel('') self.icon_label = la = QLabel('')
la.setMaximumSize(QSize(68, 68)) la.setMaximumSize(QSize(64, 64))
la.setScaledContents(True) la.setScaledContents(True)
la.setObjectName("icon_label") la.setObjectName("icon_label")
l.addWidget(la) l.addWidget(la)
@ -75,7 +75,7 @@ class MessageBox(QDialog): # {{{
self.setWindowTitle(title) self.setWindowTitle(title)
self.setWindowIcon(self.icon) self.setWindowIcon(self.icon)
self.icon_label.setPixmap(self.icon.pixmap(128, 128)) self.icon_label.setPixmap(self.icon.pixmap(64, 64))
self.msg.setText(msg) self.msg.setText(msg)
self.det_msg.setPlainText(det_msg) self.det_msg.setPlainText(det_msg)
self.det_msg.setVisible(False) self.det_msg.setVisible(False)
@ -452,9 +452,8 @@ class JobError(QDialog): # {{{
# }}} # }}}
if __name__ == '__main__': if __name__ == '__main__':
app = QApplication([]) from calibre.gui2 import question_dialog, Application
from calibre.gui2 import question_dialog app = Application([])
print question_dialog(None, 'title', 'msg <a href="http://google.com">goog</a> ', print(question_dialog(None, 'title', 'msg <a href="http://google.com">goog</a> ',
det_msg='det '*1000, det_msg='det '*1000,
show_copy_button=True) show_copy_button=True))