Browse Source

Fixed a bug where ConcertinaPanel::setPanelHeaderSize() wouldn't resize the panel header correctly.

tags/2021-05-28
ed 8 years ago
parent
commit
50eeb1df7e
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp

+ 5
- 2
modules/juce_gui_basics/layout/juce_ConcertinaPanel.cpp View File

@@ -349,12 +349,15 @@ void ConcertinaPanel::setMaximumPanelSize (Component* component, int maximumSize
void ConcertinaPanel::setPanelHeaderSize (Component* component, int headerSize) void ConcertinaPanel::setPanelHeaderSize (Component* component, int headerSize)
{ {
const int index = indexOfComp (component);
const auto index = indexOfComp (component);
jassert (index >= 0); // The specified component doesn't seem to have been added! jassert (index >= 0); // The specified component doesn't seem to have been added!
if (index >= 0) if (index >= 0)
{ {
currentSizes->get(index).minSize = headerSize;
auto oldMin = currentSizes->get (index).minSize;
currentSizes->get (index).minSize = headerSize;
currentSizes->get (index).size += headerSize - oldMin;
resized(); resized();
} }
} }


Loading…
Cancel
Save