1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Modernised some code in CallOutBox and added some logic to scale the window with its content component's transform

This commit is contained in:
ed 2020-08-24 17:07:01 +01:00
parent 333f98d204
commit 268ac3d5c8
8 changed files with 39 additions and 41 deletions

View file

@ -87,11 +87,11 @@ public:
void clicked() override
{
auto* colourSelector = new ColourSelector (ColourSelector::showAlphaChannel
| ColourSelector::showColourAtTop
| ColourSelector::editableColour
| ColourSelector::showSliders
| ColourSelector::showColourspace);
auto colourSelector = std::make_unique<ColourSelector> (ColourSelector::showAlphaChannel
| ColourSelector::showColourAtTop
| ColourSelector::editableColour
| ColourSelector::showSliders
| ColourSelector::showColourspace);
colourSelector->setName ("background");
colourSelector->setCurrentColour (findColour (TextButton::buttonColourId));
@ -99,7 +99,7 @@ public:
colourSelector->setColour (ColourSelector::backgroundColourId, Colours::transparentBlack);
colourSelector->setSize (300, 400);
CallOutBox::launchAsynchronously (colourSelector, getScreenBounds(), nullptr);
CallOutBox::launchAsynchronously (std::move (colourSelector), getScreenBounds(), nullptr);
}
using TextButton::clicked;