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

CapabilityInquiryDemo: Adapt UI layout to narrow screens

This commit is contained in:
attila 2025-04-16 15:30:52 +02:00 committed by Attila Szarvas
parent 6a53ddcb77
commit e574542db0

View file

@ -3713,11 +3713,15 @@ public:
void resized() override
{
tabs.setBounds (getLocalBounds());
auto bounds = getLocalBounds();
auto buttonStrip = bounds.getWidth() < 650 ? bounds.removeFromTop (tabs.getTabBarDepth())
: getLocalBounds().removeFromTop (tabs.getTabBarDepth());
const auto buttonBounds = getLocalBounds().removeFromTop (tabs.getTabBarDepth())
.removeFromRight (300)
.reduced (2);
tabs.setBounds (bounds);
const auto buttonBounds = buttonStrip.removeFromTop (tabs.getTabBarDepth())
.removeFromRight (300)
.reduced (2);
Utils::doColumnLayout (buttonBounds, loadButton, saveButton);
}