From eb1626d092659247753f57e66f77586dc90febef Mon Sep 17 00:00:00 2001 From: jensenpat Date: Thu, 16 Jul 2026 10:41:08 -0700 Subject: [PATCH] Keep Add Memory visible in short drawers Principle XI. --- src/gui/MemoryBrowsePanel.cpp | 12 ++++++++---- src/gui/SpectrumOverlayMenu.cpp | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/gui/MemoryBrowsePanel.cpp b/src/gui/MemoryBrowsePanel.cpp index 15e0e5052..1becc046f 100644 --- a/src/gui/MemoryBrowsePanel.cpp +++ b/src/gui/MemoryBrowsePanel.cpp @@ -72,10 +72,14 @@ MemoryBrowsePanel::MemoryBrowsePanel(QWidget* parent) root->addWidget(m_table, 1); m_table->hide(); - // "MEM+" button anchored at the bottom of the panel — outside the - // scrolling table so it stays visible regardless of scroll position. - // Style matches the spectrum overlay menu buttons it replaces. + // Keep the list action at the top of the panel, immediately above the + // scrolling rows. The bottom of this fixed-height drawer can be clipped + // by short panadapters, but its top remains visible. m_addBtn = new QPushButton(QStringLiteral("Add Memory"), this); + m_addBtn->setObjectName(QStringLiteral("memoryAddButton")); + m_addBtn->setAccessibleName(QStringLiteral("Add Memory")); + m_addBtn->setAccessibleDescription( + QStringLiteral("Save the current slice on this panadapter as a memory.")); m_addBtn->setFixedHeight(22); AetherSDR::ThemeManager::instance().applyStyleSheet(m_addBtn, "QPushButton { background: rgba(20, 30, 45, 240); " "border: 1px solid rgba(255, 255, 255, 40); border-radius: 2px; " @@ -83,7 +87,7 @@ MemoryBrowsePanel::MemoryBrowsePanel(QWidget* parent) "QPushButton:hover { background: rgba(0, 112, 192, 180); " "border: 1px solid {{color.accent.dim}}; }"); m_addBtn->setToolTip("Save the current slice on this panadapter as a memory."); - root->addWidget(m_addBtn, 0); + root->insertWidget(0, m_addBtn, 0); connect(m_addBtn, &QPushButton::clicked, this, &MemoryBrowsePanel::quickAddRequested); diff --git a/src/gui/SpectrumOverlayMenu.cpp b/src/gui/SpectrumOverlayMenu.cpp index c15b31e85..ba545e6e8 100644 --- a/src/gui/SpectrumOverlayMenu.cpp +++ b/src/gui/SpectrumOverlayMenu.cpp @@ -295,7 +295,7 @@ SpectrumOverlayMenu::SpectrumOverlayMenu(QWidget* parent) {"ANT", 1, nullptr}, // 3 — toggleAntPanel {"Display", 4, nullptr}, // 4 — toggleDisplayPanel {"Memory", 5, nullptr}, // 6 — toggleMemoryPanel - // MEM+ moved into MemoryBrowsePanel (bottom button — doesn't scroll). + // Add Memory lives at the top of MemoryBrowsePanel, outside the scrolling rows. {"DAX", 3, nullptr}, // 6 — toggleDaxPanel };