mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-05 01:23:38 +02:00
Scale cover upto half height of side book details pane when resizing pane
This commit is contained in:
parent
65e12335b8
commit
82fabe3777
1 changed files with 3 additions and 2 deletions
|
|
@ -89,13 +89,13 @@ def do_layout(self):
|
|||
pixmap = self.pixmap
|
||||
pwidth, pheight = pixmap.width(), pixmap.height()
|
||||
self.pwidth, self.pheight = fit_image(pwidth, pheight,
|
||||
self.maximumWidth(), self.maximumHeight())[1:]
|
||||
self.rect().width(), self.rect().height())[1:]
|
||||
self.current_pixmap_size = QSize(self.pwidth, self.pheight)
|
||||
self.animation.setEndValue(self.current_pixmap_size)
|
||||
|
||||
def relayout(self, parent_size):
|
||||
self.setMaximumSize(parent_size.width(),
|
||||
int(parent_size.height()/3.)+1)
|
||||
min(int(parent_size.height()/2.),int(4/3. * parent_size.width())+1))
|
||||
self.resize(self.maximumSize())
|
||||
self.animation.stop()
|
||||
self.do_layout()
|
||||
|
|
@ -243,6 +243,7 @@ def __init__(self, parent=None):
|
|||
self.book_info.link_clicked.connect(self._link_clicked)
|
||||
self.book_info.mr.connect(self.mouseReleaseEvent)
|
||||
self.setMinimumSize(QSize(190, 200))
|
||||
self.setCursor(Qt.PointingHandCursor)
|
||||
|
||||
def _link_clicked(self, link):
|
||||
typ, _, val = link.partition(':')
|
||||
|
|
|
|||
Loading…
Reference in a new issue