From acabf89e015ed0931b5534af54a27c2a575d0bc2 Mon Sep 17 00:00:00 2001 From: mio Date: Mon, 21 Apr 2025 13:38:39 +1000 Subject: Rework media information dialog Currently, the info dialog (shortcut I) can exceed the screen bounds as it requests all information and displays it in a single vertical list. This commit changes it so less information is requested and cleans up the dialog. Signed-off-by: mio --- src/app/stateChange.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/app/stateChange.cpp') diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp index 2418209..1e79bdb 100644 --- a/src/app/stateChange.cpp +++ b/src/app/stateChange.cpp @@ -102,7 +102,6 @@ MainWindow::engineStateChanged( Engine::State state ) } } - /// update statusBar { using namespace Engine; @@ -120,6 +119,16 @@ MainWindow::engineStateChanged( Engine::State state ) m_widgetStack->raiseWidget(m_audioView); } + // Update MediaInfoDialog + if (state == Engine::Empty || state == Engine::TrackEnded || state == Engine::Loaded) + { + if (m_mediaInfoDialog) + { + reinterpret_cast(m_mediaInfoDialog)->deleteLater(); + m_mediaInfoDialog = nullptr; + } + } + /// update position slider switch( state ) -- cgit v1.2.3