mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ComponentPeer: Deprecate getFrameSize()
This commit is contained in:
parent
454ff64631
commit
6575d24a81
8 changed files with 67 additions and 10 deletions
|
|
@ -532,9 +532,12 @@ String ResizableWindow::getWindowStateAsString()
|
|||
#if JUCE_LINUX
|
||||
if (auto* peer = isOnDesktop() ? getPeer() : nullptr)
|
||||
{
|
||||
const auto frameSize = peer->getFrameSize();
|
||||
stateString << " frame " << frameSize.getTop() << ' ' << frameSize.getLeft()
|
||||
<< ' ' << frameSize.getBottom() << ' ' << frameSize.getRight();
|
||||
if (const auto optionalFrameSize = peer->getFrameSizeIfPresent())
|
||||
{
|
||||
const auto& frameSize = *optionalFrameSize;
|
||||
stateString << " frame " << frameSize.getTop() << ' ' << frameSize.getLeft()
|
||||
<< ' ' << frameSize.getBottom() << ' ' << frameSize.getRight();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -610,7 +613,9 @@ bool ResizableWindow::restoreWindowStateFromString (const String& s)
|
|||
|
||||
if (peer != nullptr)
|
||||
{
|
||||
peer->getFrameSize().subtractFrom (newPos);
|
||||
if (const auto frameSize = peer->getFrameSizeIfPresent())
|
||||
frameSize->subtractFrom (newPos);
|
||||
|
||||
peer->setNonFullScreenBounds (newPos);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue