mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-11 09:13:57 -04:00
Edit book: Fix the "Show changes" window moving down by a few pixels every time it is opened
This commit is contained in:
parent
6890a437c0
commit
8c0dbb9370
@ -218,10 +218,8 @@ class Diff(Dialog):
|
||||
self.apply_diff_calls = []
|
||||
self.show_open_in_editor = show_open_in_editor
|
||||
self.revert_button_msg = revert_button_msg
|
||||
self.show_as_window = show_as_window
|
||||
Dialog.__init__(self, _('Differences between books'), 'diff-dialog', parent=parent)
|
||||
self.setWindowFlags(self.windowFlags() | Qt.WindowType.WindowMinMaxButtonsHint)
|
||||
if show_as_window:
|
||||
self.setWindowFlags(Qt.WindowType.Window)
|
||||
self.view.line_activated.connect(self.line_activated)
|
||||
|
||||
def sizeHint(self):
|
||||
@ -230,6 +228,10 @@ class Diff(Dialog):
|
||||
|
||||
def setup_ui(self):
|
||||
self.setWindowIcon(QIcon.ic('diff.png'))
|
||||
if self.show_as_window:
|
||||
self.setWindowFlags(Qt.WindowType.Window)
|
||||
else:
|
||||
self.setWindowFlags(self.windowFlags() | Qt.WindowType.WindowMinMaxButtonsHint)
|
||||
self.stacks = st = QStackedLayout(self)
|
||||
self.busy = BusyWidget(self)
|
||||
self.w = QWidget(self)
|
||||
|
Loading…
x
Reference in New Issue
Block a user