diff options
author | mio <stigma@disroot.org> | 2025-04-21 13:38:39 +1000 |
---|---|---|
committer | mio <stigma@disroot.org> | 2025-04-27 11:35:46 +1000 |
commit | acabf89e015ed0931b5534af54a27c2a575d0bc2 (patch) | |
tree | f93a2b62606873ec5873db633557a0d5e2381b9e /src/app/stateChange.cpp | |
parent | 37df0c3b3c2ff66308d5e345ac8ead8de6304612 (diff) | |
download | codeine-other/media-info-window.tar.gz codeine-other/media-info-window.zip |
Rework media information dialogother/media-info-window
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 <stigma@disroot.org>
Diffstat (limited to 'src/app/stateChange.cpp')
-rw-r--r-- | src/app/stateChange.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
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<TQWidget*>(m_mediaInfoDialog)->deleteLater(); + m_mediaInfoDialog = nullptr; + } + } + /// update position slider switch( state ) |