| @@ -689,3 +689,22 @@ void IntrojucerLookAndFeel::fillWithBackgroundTexture (Graphics& g) | |||||
| g.setTiledImageFill (backgroundTexture, 0, 0, 1.0f); | g.setTiledImageFill (backgroundTexture, 0, 0, 1.0f); | ||||
| g.fillAll(); | g.fillAll(); | ||||
| } | } | ||||
| void IntrojucerLookAndFeel::drawConcertinaPanelHeader (Graphics& g, const Rectangle<int>& area, | |||||
| bool isMouseOver, bool isMouseDown, | |||||
| ConcertinaPanel& concertina, Component& panel) | |||||
| { | |||||
| const Colour bkg (findColour (mainBackgroundColourId)); | |||||
| g.setGradientFill (ColourGradient (Colours::white.withAlpha (isMouseOver ? 0.4f : 0.2f), 0, area.getY(), | |||||
| Colours::darkgrey.withAlpha (0.2f), 0, area.getBottom(), false)); | |||||
| g.fillAll(); | |||||
| g.setColour (bkg.contrasting().withAlpha (0.04f)); | |||||
| g.fillRect (area.withHeight (1)); | |||||
| g.fillRect (area.withTop (area.getBottom() - 1)); | |||||
| g.setColour (bkg.contrasting()); | |||||
| g.setFont (Font (area.getHeight() * 0.6f).boldened()); | |||||
| g.drawFittedText (panel.getName(), 4, 0, area.getWidth() - 6, area.getHeight(), Justification::centredLeft, 1); | |||||
| } | |||||
| @@ -105,6 +105,9 @@ public: | |||||
| void drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height, bool isScrollbarVertical, | void drawScrollbar (Graphics& g, ScrollBar& scrollbar, int x, int y, int width, int height, bool isScrollbarVertical, | ||||
| int thumbStartPosition, int thumbSize, bool /*isMouseOver*/, bool /*isMouseDown*/); | int thumbStartPosition, int thumbSize, bool /*isMouseOver*/, bool /*isMouseDown*/); | ||||
| void drawConcertinaPanelHeader (Graphics& g, const Rectangle<int>& area, | |||||
| bool isMouseOver, bool isMouseDown, | |||||
| ConcertinaPanel& concertina, Component& panel); | |||||
| private: | private: | ||||
| Image backgroundTexture; | Image backgroundTexture; | ||||
| Colour backgroundTextureBaseColour; | Colour backgroundTextureBaseColour; | ||||
| @@ -312,6 +312,7 @@ bool ConcertinaPanel::setPanelSize (Component* panelComponent, int height, const | |||||
| const int index = indexOfComp (panelComponent); | const int index = indexOfComp (panelComponent); | ||||
| 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! | ||||
| height += currentSizes->get(index).minSize; | |||||
| const int oldSize = currentSizes->get(index).size; | const int oldSize = currentSizes->get(index).size; | ||||
| setLayout (currentSizes->withResizedPanel (index, height, getHeight()), animate); | setLayout (currentSizes->withResizedPanel (index, height, getHeight()), animate); | ||||
| return oldSize != currentSizes->get(index).size; | return oldSize != currentSizes->get(index).size; | ||||