| 329 | } |
| 330 | |
| 331 | juce::Rectangle<int> NodeBase::getBoundsToDisplay(Rectangle<int> originalHeight) const |
| 332 | { |
| 333 | auto titleWidth = GLOBAL_BOLD_FONT().getStringWidthFloat(getName()); |
| 334 | auto minWidth = jmax<int>(UIValues::NodeWidth, titleWidth + UIValues::HeaderHeight * 4); |
| 335 | |
| 336 | if (v_data[PropertyIds::Folded]) |
| 337 | { |
| 338 | |
| 339 | originalHeight = originalHeight.withHeight(UIValues::HeaderHeight).withWidth(minWidth); |
| 340 | } |
| 341 | |
| 342 | if(originalHeight.getWidth() < minWidth) |
| 343 | originalHeight.setWidth(minWidth); |
| 344 | |
| 345 | auto helpBounds = helpManager.getHelpSize().toNearestInt(); |
| 346 | |
| 347 | if (!helpBounds.isEmpty()) |
| 348 | { |
| 349 | if(!helpManager.isHelpBelow()) |
| 350 | { |
| 351 | originalHeight.setWidth(originalHeight.getWidth() + helpBounds.getWidth()); |
| 352 | originalHeight.setHeight(jmax<int>(originalHeight.getHeight(), helpBounds.getHeight())); |
| 353 | } |
| 354 | else |
| 355 | { |
| 356 | originalHeight.setWidth(jmax<int>(originalHeight.getWidth(), helpBounds.getWidth())); |
| 357 | originalHeight.setHeight(originalHeight.getHeight() + helpBounds.getHeight()); |
| 358 | } |
| 359 | } |
| 360 | |
| 361 | if (getRootNetwork()->getExceptionHandler().getErrorMessage(this).isNotEmpty()) |
| 362 | originalHeight.setHeight(jmax(originalHeight.getHeight(), 150)); |
| 363 | |
| 364 | return originalHeight; |
| 365 | } |
| 366 | |
| 367 | |
| 368 |
nothing calls this directly
no test coverage detected