mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
StandaloneFilterWindow: Take native window borders into account when constraining size
This commit is contained in:
parent
6eac100a79
commit
e329f524a2
1 changed files with 11 additions and 2 deletions
|
|
@ -979,8 +979,17 @@ private:
|
|||
if (auto* editorConstrainer = editor->getConstrainer())
|
||||
{
|
||||
const auto borders = owner.getContentComponentBorder();
|
||||
const auto extraWindowWidth = borders.getLeftAndRight();
|
||||
const auto extraWindowHeight = extraHeight + borders.getTopAndBottom();
|
||||
|
||||
const auto windowBorders = [&]() -> BorderSize<int>
|
||||
{
|
||||
if (auto* peer = owner.getPeer())
|
||||
return peer->getFrameSize();
|
||||
|
||||
return {};
|
||||
}();
|
||||
|
||||
const auto extraWindowWidth = borders.getLeftAndRight() + windowBorders.getLeftAndRight();
|
||||
const auto extraWindowHeight = extraHeight + borders.getTopAndBottom() + windowBorders.getTopAndBottom();
|
||||
|
||||
owner.setResizeLimits (jmax (10, editorConstrainer->getMinimumWidth() + extraWindowWidth),
|
||||
jmax (10, editorConstrainer->getMinimumHeight() + extraWindowHeight),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue