From ee25038cbea9a5c64f318d60e86054aacfe1dddb Mon Sep 17 00:00:00 2001 From: Bonni Date: Wed, 21 Oct 2026 17:29:27 -0300 Subject: [PATCH] Organ settings: opens wide enough for the MIDI tab's keyboard rows (#493) --- src/mp_ui/OrganSettings.cpp | 5 ++++- src/mp_ui/Settings.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/mp_ui/OrganSettings.cpp b/src/mp_ui/OrganSettings.cpp index 0870b68c..f3a2847d 100644 --- a/src/mp_ui/OrganSettings.cpp +++ b/src/mp_ui/OrganSettings.cpp @@ -943,7 +943,10 @@ OrganSettingsWindow::OrganSettingsWindow(MasterpieceProcessor& p, std::function< midiScroll_ = std::make_unique(*midi_, 0, [this] { return midi_->contentHeight(); }); tabs_.addTab(TRANS("MIDI"), kBackground, midiScroll_.get(), false); } - setSize(660, 560); + // Wide enough for a keyboard's row on the MIDI tab at its full widths: + // name, channel, device and the range button (#493). The tabs scroll, so + // the height stays what a 720-pixel screen holds whole. + setSize(780, 560); } OrganSettingsWindow::~OrganSettingsWindow() { diff --git a/src/mp_ui/Settings.cpp b/src/mp_ui/Settings.cpp index 77a9b994..f0b860d6 100644 --- a/src/mp_ui/Settings.cpp +++ b/src/mp_ui/Settings.cpp @@ -1989,8 +1989,11 @@ void MidiPanel::resized() { keyboardLabels_[i]->setBounds(kbRow.removeFromLeft(150)); keyboardChannels_[i]->setBounds(kbRow.removeFromLeft(170)); kbRow.removeFromLeft(6); + // In a narrow window the device box gives way first: the range button's + // text shrank to a few pixels when it took the remainder (#493). + const int deviceWidth = juce::jlimit(140, 200, kbRow.getWidth() - 6 - 160); if (i < keyboardDevices_.size()) - keyboardDevices_[i]->setBounds(kbRow.removeFromLeft(200)); + keyboardDevices_[i]->setBounds(kbRow.removeFromLeft(deviceWidth)); kbRow.removeFromLeft(6); if (i < keyboardMore_.size()) keyboardMore_[i]->setBounds(kbRow.removeFromLeft(160).reduced(0, 1));