Commit a8ed2d9f authored by Romain Vimont's avatar Romain Vimont Committed by Hugo Beauzée-Luyssen

qt: toogle info panel visibility

Make the info button toggle the info panel visibility: if the panel is
already open, clicking on the info button closes it (like the
"adjustments and effects" panel).

Fixes #19767
Signed-off-by: default avatarHugo Beauzée-Luyssen <hugo@beauzee.fr>
parent 58155349
......@@ -143,6 +143,11 @@ void MediaInfoDialog::showTab( panel i_tab = META_PANEL )
show();
}
int MediaInfoDialog::currentTab()
{
return infoTabW->currentIndex();
}
void MediaInfoDialog::saveMeta()
{
MP->saveMeta();
......
......@@ -47,6 +47,7 @@ public:
};
void showTab( panel );
int currentTab();
#if 0
void setInput( input_item_t * );
#endif
......
......@@ -311,12 +311,20 @@ void DialogsProvider::aboutDialog()
void DialogsProvider::mediaInfoDialog()
{
MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::META_PANEL );
MediaInfoDialog *dialog = MediaInfoDialog::getInstance( p_intf );
if( !dialog->isVisible() || dialog->currentTab() != MediaInfoDialog::META_PANEL )
dialog->showTab( MediaInfoDialog::META_PANEL );
else
dialog->hide();
}
void DialogsProvider::mediaCodecDialog()
{
MediaInfoDialog::getInstance( p_intf )->showTab( MediaInfoDialog::INFO_PANEL );
MediaInfoDialog *dialog = MediaInfoDialog::getInstance( p_intf );
if( !dialog->isVisible() || dialog->currentTab() != MediaInfoDialog::INFO_PANEL )
dialog->showTab( MediaInfoDialog::INFO_PANEL );
else
dialog->hide();
}
void DialogsProvider::bookmarksDialog()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment