From 2f014aec8a34e774e3e0a584555efd8c40be62b7 Mon Sep 17 00:00:00 2001 From: NeilClack Date: Thu, 13 Aug 2026 16:17:37 -0500 Subject: [PATCH] Increase audio track list window to full-height --- src/audio_settings_page.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/audio_settings_page.cpp b/src/audio_settings_page.cpp index 0a9e748..fa378c1 100644 --- a/src/audio_settings_page.cpp +++ b/src/audio_settings_page.cpp @@ -422,7 +422,13 @@ void AudioSettingsPage::renderModal(SDL_Renderer* renderer, float fw, float fh, { float itemHeight = 45.0f; float listY = currentY; - int visibleItems = std::min(8, static_cast(items.size())); + + // Fill the pop-up down to its bottom edge so as many options fit as + // the box allows. Overflow is clipped at the box bottom instead of + // halfway down the screen. + float listBottom = boxY + boxH - 16.0f; + int visibleItems = std::max(1, std::min(static_cast(items.size()), + static_cast((listBottom - listY) / itemHeight))); int startIdx = 0; // Center the visible window around selected index @@ -435,7 +441,7 @@ void AudioSettingsPage::renderModal(SDL_Renderer* renderer, float fw, float fh, if (modalItems_.size() < static_cast(endIdx)) modalItems_.resize(endIdx); for (int i = startIdx; i < endIdx; ++i) { - if (listY + itemHeight > fh - 80.0f) break; + if (listY + itemHeight > listBottom) break; SDL_Color color = (i == modalSelectedIndex_) ? yellow : white; if (i == 0 && modalState_ == ModalState::TrackSelector) {