mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix some edit widget appearing in the wrong place when editing in the right hand panel of the new split book list. Fixes #1748713 [Custom Column edit popup appears in wrong place with split book list](https://bugs.launchpad.net/calibre/+bug/1748713)
This commit is contained in:
parent
0441e59905
commit
b2ab2bfd6a
@ -64,8 +64,12 @@ class UpdateEditorGeometry(object):
|
||||
new_width += r.width()
|
||||
|
||||
# Compute the maximum we can show if we consume the entire viewport
|
||||
max_width = (self.table_widget.horizontalScrollBar().geometry().width() -
|
||||
self.table_widget.verticalHeader().width())
|
||||
pin_view = self.table_widget.pin_view
|
||||
if pin_view.isVisible() and pin_view.geometry().x() <= initial_geometry.x():
|
||||
max_width = pin_view.horizontalScrollBar().geometry().width()
|
||||
else:
|
||||
view = self.table_widget
|
||||
max_width = view.horizontalScrollBar().geometry().width() - view.verticalHeader().width()
|
||||
# What we have to display might not fit. If so, adjust down
|
||||
new_width = new_width if new_width < max_width else max_width
|
||||
|
||||
@ -156,6 +160,7 @@ def make_clearing_spinbox(spinbox):
|
||||
return spinbox.keyPressEvent(self, ev)
|
||||
return SpinBox
|
||||
|
||||
|
||||
ClearingSpinBox = make_clearing_spinbox(QSpinBox)
|
||||
ClearingDoubleSpinBox = make_clearing_spinbox(QDoubleSpinBox)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user