mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
Projucer: Made login form overlay modal
This commit is contained in:
parent
185b1b324b
commit
4849b9ffcf
1 changed files with 11 additions and 6 deletions
|
|
@ -53,6 +53,8 @@ public:
|
|||
|
||||
static_cast<Component&> (mainWindow).addChildComponent (this);
|
||||
componentMovedOrResized (true, true);
|
||||
|
||||
enterModalState();
|
||||
}
|
||||
|
||||
void resized() override
|
||||
|
|
@ -67,6 +69,11 @@ public:
|
|||
g.drawImage (componentImage, getLocalBounds().toFloat());
|
||||
}
|
||||
|
||||
void inputAttemptWhenModal() override
|
||||
{
|
||||
mainWindow.hideLoginFormOverlay();
|
||||
}
|
||||
|
||||
private:
|
||||
void componentPeerChanged() override {}
|
||||
|
||||
|
|
@ -92,7 +99,8 @@ private:
|
|||
|
||||
void refreshBackgroundImage()
|
||||
{
|
||||
setVisible (false);
|
||||
setAlwaysOnTop (false);
|
||||
toBack();
|
||||
|
||||
auto parentBounds = mainWindow.getBounds();
|
||||
|
||||
|
|
@ -102,7 +110,8 @@ private:
|
|||
|
||||
kernel.applyToImage (componentImage, componentImage, getLocalBounds());
|
||||
|
||||
setVisible (true);
|
||||
setAlwaysOnTop (true);
|
||||
toFront (true);
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
|
|
@ -479,10 +488,6 @@ void MainWindow::showLoginFormOverlay()
|
|||
{
|
||||
blurOverlayComponent = std::make_unique<BlurOverlayWithComponent> (*this, std::make_unique<LoginFormComponent> (*this));
|
||||
loginFormOpen = true;
|
||||
|
||||
if (auto* loginForm = blurOverlayComponent->getChildComponent (0))
|
||||
if (auto* handler = loginForm->getAccessibilityHandler())
|
||||
handler->grabFocus();
|
||||
}
|
||||
|
||||
void MainWindow::hideLoginFormOverlay()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue