mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-07 10:14:46 -04:00
pep8
This commit is contained in:
parent
c03377adc4
commit
13f9a4b7c9
@ -699,8 +699,7 @@ class DocumentView(QWebView): # {{{
|
|||||||
table = None
|
table = None
|
||||||
parent = elem
|
parent = elem
|
||||||
while not parent.isNull():
|
while not parent.isNull():
|
||||||
if (unicode(parent.tagName()) == u'table' or
|
if (unicode(parent.tagName()) == u'table' or unicode(parent.localName()) == u'table'):
|
||||||
unicode(parent.localName()) == u'table'):
|
|
||||||
table = parent
|
table = parent
|
||||||
break
|
break
|
||||||
parent = parent.parent()
|
parent = parent.parent()
|
||||||
@ -822,8 +821,7 @@ class DocumentView(QWebView): # {{{
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def scroll_pos(self):
|
def scroll_pos(self):
|
||||||
return (self.document.ypos, self.document.ypos +
|
return (self.document.ypos, self.document.ypos + self.document.window_height)
|
||||||
self.document.window_height)
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def viewport_rect(self):
|
def viewport_rect(self):
|
||||||
@ -1336,8 +1334,7 @@ class DocumentView(QWebView): # {{{
|
|||||||
self.paged_col_scroll(scroll_past_end=not
|
self.paged_col_scroll(scroll_past_end=not
|
||||||
self.document.line_scrolling_stops_on_pagebreaks)
|
self.document.line_scrolling_stops_on_pagebreaks)
|
||||||
else:
|
else:
|
||||||
if (not self.document.line_scrolling_stops_on_pagebreaks and
|
if (not self.document.line_scrolling_stops_on_pagebreaks and self.document.at_bottom):
|
||||||
self.document.at_bottom):
|
|
||||||
self.manager.next_document()
|
self.manager.next_document()
|
||||||
else:
|
else:
|
||||||
amt = int((self.document.line_scroll_fraction / 100.) * 15)
|
amt = int((self.document.line_scroll_fraction / 100.) * 15)
|
||||||
@ -1347,8 +1344,7 @@ class DocumentView(QWebView): # {{{
|
|||||||
self.paged_col_scroll(forward=False, scroll_past_end=not
|
self.paged_col_scroll(forward=False, scroll_past_end=not
|
||||||
self.document.line_scrolling_stops_on_pagebreaks)
|
self.document.line_scrolling_stops_on_pagebreaks)
|
||||||
else:
|
else:
|
||||||
if (not self.document.line_scrolling_stops_on_pagebreaks and
|
if (not self.document.line_scrolling_stops_on_pagebreaks and self.document.at_top):
|
||||||
self.document.at_top):
|
|
||||||
self.manager.previous_document()
|
self.manager.previous_document()
|
||||||
else:
|
else:
|
||||||
amt = int((self.document.line_scroll_fraction / 100.) * 15)
|
amt = int((self.document.line_scroll_fraction / 100.) * 15)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user