MCPcopy Create free account
hub / github.com/bhowiebkr/PyFlowGraph / _calculate_minimum_height

Method _calculate_minimum_height

src/core/node.py:215–223  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

213 self.fit_size_to_content()
214
215 def _calculate_minimum_height(self):
216 title_height, pin_spacing, pin_margin_top = 32, 25, 15
217 num_pins = max(len(self.input_pins), len(self.output_pins))
218 pin_area_height = (num_pins * pin_spacing) if num_pins > 0 else 0
219
220 self.content_container.layout().activate()
221 content_height = self.content_container.sizeHint().height()
222
223 return title_height + pin_area_height + pin_margin_top + content_height + 1
224
225 def calculate_absolute_minimum_size(self):
226 """Calculate the absolute minimum size needed for this node's content.

Callers 1

mouseMoveEventMethod · 0.95

Calls 1

sizeHintMethod · 0.80

Tested by

no test coverage detected