mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-23 20:13:18 +02:00
Always disable horiz scroll bars in diff view
This commit is contained in:
parent
ec38ff9b95
commit
a64e89bcc4
1 changed files with 1 additions and 6 deletions
|
|
@ -116,7 +116,7 @@ def __init__(self, right=False, parent=None, show_open_in_editor=False):
|
|||
self.line_number_map = LineNumberMap()
|
||||
self.search_header_pos = 0
|
||||
self.changes, self.headers, self.images = [], [], OrderedDict()
|
||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOff), self.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
|
||||
self.diff_backgrounds = {
|
||||
'replace' : theme_color(theme, 'DiffReplace', 'bg'),
|
||||
'insert' : theme_color(theme, 'DiffInsert', 'bg'),
|
||||
|
|
@ -512,11 +512,6 @@ def clear(self):
|
|||
self.left.clear(), self.right.clear()
|
||||
|
||||
def finalize(self):
|
||||
# check horizontal scrollbars and force both if scrollbar visible only at one side
|
||||
if self.left.horizontalScrollBar().isVisible() or self.right.horizontalScrollBar().isVisible():
|
||||
self.left.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
self.right.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOn)
|
||||
|
||||
for v in (self.left, self.right):
|
||||
c = v.textCursor()
|
||||
c.movePosition(c.Start)
|
||||
|
|
|
|||
Loading…
Reference in a new issue