mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
8a88c2a620
commit
5979d46fd2
@ -91,6 +91,12 @@ if pictureflow is not None:
|
|||||||
elif ev.delta() > 0:
|
elif ev.delta() > 0:
|
||||||
self.showPrevious()
|
self.showPrevious()
|
||||||
|
|
||||||
|
def resizeEvent(self, *args):
|
||||||
|
ans = pictureflow.PictureFlow.resizeEvent(self, *args)
|
||||||
|
height = self.height()/2.
|
||||||
|
self.setSlideSize(QSize(int(2/3. * height), height))
|
||||||
|
return ans
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
CoverFlow = None
|
CoverFlow = None
|
||||||
@ -126,7 +132,7 @@ class CoverFlowMixin(object):
|
|||||||
if show:
|
if show:
|
||||||
d = QDialog(self)
|
d = QDialog(self)
|
||||||
ah, aw = available_height(), available_width()
|
ah, aw = available_height(), available_width()
|
||||||
d.resize(int(aw/2.), ah-60)
|
d.resize(int(aw/1.5), ah-60)
|
||||||
d._layout = QStackedLayout()
|
d._layout = QStackedLayout()
|
||||||
d.setLayout(d._layout)
|
d.setLayout(d._layout)
|
||||||
d.setWindowTitle(_('Browse by covers'))
|
d.setWindowTitle(_('Browse by covers'))
|
||||||
@ -203,8 +209,8 @@ if __name__ == '__main__':
|
|||||||
app = QApplication([])
|
app = QApplication([])
|
||||||
w = QMainWindow()
|
w = QMainWindow()
|
||||||
cf = CoverFlow()
|
cf = CoverFlow()
|
||||||
cf.resize(cf.minimumSize())
|
cf.resize(int(available_width()/1.5), available_height()-60)
|
||||||
w.resize(cf.minimumSize()+QSize(30, 20))
|
w.resize(cf.size()+QSize(30, 20))
|
||||||
path = sys.argv[1]
|
path = sys.argv[1]
|
||||||
model = FileSystemImages(sys.argv[1])
|
model = FileSystemImages(sys.argv[1])
|
||||||
cf.setImages(model)
|
cf.setImages(model)
|
||||||
|
@ -242,6 +242,12 @@ class LibraryViewMixin(object): # {{{
|
|||||||
self.library_view.model().set_book_on_device_func(self.book_on_device)
|
self.library_view.model().set_book_on_device_func(self.book_on_device)
|
||||||
prefs['library_path'] = self.library_path
|
prefs['library_path'] = self.library_path
|
||||||
|
|
||||||
|
for view in ('library', 'memory', 'card_a', 'card_b'):
|
||||||
|
view = getattr(self, view+'_view')
|
||||||
|
view.verticalHeader().sectionDoubleClicked.connect(self.view_specific_book)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def show_similar_books(self, type, *args):
|
def show_similar_books(self, type, *args):
|
||||||
search, join = [], ' '
|
search, join = [], ' '
|
||||||
idx = self.library_view.currentIndex()
|
idx = self.library_view.currentIndex()
|
||||||
|
@ -355,10 +355,6 @@ class Main(MainWindow, Ui_MainWindow, DeviceGUI, ToolbarMixin,
|
|||||||
SIGNAL('start_recipe_fetch(PyQt_PyObject)'),
|
SIGNAL('start_recipe_fetch(PyQt_PyObject)'),
|
||||||
self.download_scheduled_recipe, Qt.QueuedConnection)
|
self.download_scheduled_recipe, Qt.QueuedConnection)
|
||||||
|
|
||||||
for view in ('library', 'memory', 'card_a', 'card_b'):
|
|
||||||
view = getattr(self, view+'_view')
|
|
||||||
view.verticalHeader().sectionDoubleClicked.connect(self.view_specific_book)
|
|
||||||
|
|
||||||
self.location_view.setCurrentIndex(self.location_view.model().index(0))
|
self.location_view.setCurrentIndex(self.location_view.model().index(0))
|
||||||
|
|
||||||
self._add_filesystem_book = Dispatcher(self.__add_filesystem_book)
|
self._add_filesystem_book = Dispatcher(self.__add_filesystem_book)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user