Add splitter move handler which calls search widget resizer method
parent
d5f0c59b57
commit
eed47b3733
|
@ -439,6 +439,7 @@ class LinkedSplits(QWidget):
|
|||
self.splitter = QSplitter(QtCore.Qt.Vertical)
|
||||
self.splitter.setMidLineWidth(0)
|
||||
self.splitter.setHandleWidth(2)
|
||||
self.splitter.splitterMoved.connect(self.on_splitter_adjust)
|
||||
|
||||
self.layout = QVBoxLayout(self)
|
||||
self.layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
@ -451,6 +452,16 @@ class LinkedSplits(QWidget):
|
|||
|
||||
self._symbol: Symbol = None
|
||||
|
||||
def on_splitter_adjust(
|
||||
self,
|
||||
pos: int,
|
||||
index: int,
|
||||
) -> None:
|
||||
# print(f'splitter moved pos:{pos}, index:{index}')
|
||||
godw = self.godwidget
|
||||
if self is godw.rt_linked:
|
||||
godw.search.on_resize()
|
||||
|
||||
def graphics_cycle(self, **kwargs) -> None:
|
||||
from . import _display
|
||||
ds = self.display_state
|
||||
|
@ -489,6 +500,7 @@ class LinkedSplits(QWidget):
|
|||
# give all subcharts the same remaining proportional height
|
||||
sizes.extend([min_h_ind] * ln)
|
||||
|
||||
if self.godwidget.rt_linked is self:
|
||||
self.splitter.setSizes(sizes)
|
||||
|
||||
def focus(self) -> None:
|
||||
|
|
Loading…
Reference in New Issue