From e574542db0cae1299db24b46ddd101f109733081 Mon Sep 17 00:00:00 2001 From: attila Date: Wed, 16 Apr 2025 15:30:52 +0200 Subject: [PATCH] CapabilityInquiryDemo: Adapt UI layout to narrow screens --- examples/Audio/CapabilityInquiryDemo.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/examples/Audio/CapabilityInquiryDemo.h b/examples/Audio/CapabilityInquiryDemo.h index b45c919c58..ab5505cdae 100644 --- a/examples/Audio/CapabilityInquiryDemo.h +++ b/examples/Audio/CapabilityInquiryDemo.h @@ -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); }