Fix #7826 (Book Details window sizing on netbooks screen version)

This commit is contained in:
Kovid Goyal 2010-12-14 12:45:03 -07:00
parent 88264f6650
commit bd4fbc3060
3 changed files with 13 additions and 7 deletions

View File

@ -253,7 +253,12 @@ class BookInfo(QWebView):
% (left_pane, right_pane)))
def mouseDoubleClickEvent(self, ev):
ev.ignore()
if self.width() - ev.x() < 25 or \
self.height() - ev.y() < 25:
# Filter out double clicks on the scroll bar
ev.accept()
else:
ev.ignore()
# }}}

View File

@ -23,10 +23,6 @@ class BookInfo(QDialog, Ui_BookInfo):
self.comments.sizeHint = self.comments_size_hint
self.view_func = view_func
desktop = QCoreApplication.instance().desktop()
screen_height = desktop.availableGeometry().height() - 100
self.resize(self.size().width(), screen_height)
self.view = view
self.current_row = None
@ -40,8 +36,13 @@ class BookInfo(QDialog, Ui_BookInfo):
self.fit_cover.stateChanged.connect(self.toggle_cover_fit)
self.cover.resizeEvent = self.cover_view_resized
desktop = QCoreApplication.instance().desktop()
screen_height = desktop.availableGeometry().height() - 100
self.resize(self.size().width(), screen_height)
def comments_size_hint(self):
return QSize(350, 350)
return QSize(350, 250)
def toggle_cover_fit(self, state):
dynamic.set('book_info_dialog_fit_cover', self.fit_cover.isChecked())

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>917</width>
<height>783</height>
<height>480</height>
</rect>
</property>
<property name="windowTitle">