[vlc-commits] [Git][videolan/vlc][master] 3 commits: qt: fix keyboard navigation getting stuck in effects dialog sync tab

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Sat Feb 19 18:09:58 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
fce27cf9 by Lyndon Brown at 2022-02-19T17:42:26+00:00
qt: fix keyboard navigation getting stuck in effects dialog sync tab

If you used the `Tab` key to navigate between controls within the
synchronization tab of the effects dialog, once you landed upon the refresh
button (the circular icon, top-right) navigation got stuck, refusing to
jump to a new control.

I tracked down the cause to be related to the fact that the next control in
the tab list will be the 'apply' button, but in a tab change event handler
we hide the apply button for the sync tab. This seems to confuse Qt, though
navigating in reverse (`Shift`+`Tab`) works fine. Flipping the focus policy
of the button depending upon whether or not it is hidden works as a fix.

Fixes #25923.

- - - - -
1c8d969c by Lyndon Brown at 2022-02-19T17:42:26+00:00
qt: fix wrong object parent

The effects dialog sync tab widget should belong to the main tab widget,
not the secondary tab widget within the video tab, which makes no sense.

(No functional change).

- - - - -
f50f7fee by Lyndon Brown at 2022-02-19T17:42:26+00:00
qt: remove duplicate statements in effects dialog construction

(No functional change).

- - - - -


1 changed file:

- modules/gui/qt/dialogs/extended/extended.cpp


Changes:

=====================================
modules/gui/qt/dialogs/extended/extended.cpp
=====================================
@@ -73,12 +73,10 @@ ExtendedDialog::ExtendedDialog( qt_intf_t *_p_intf )
     Spatializer *spatial = new Spatializer( p_intf, audioTab );
     CONNECT( spatial, configChanged(QString, QVariant), this, putAudioConfig(QString, QVariant) );
     audioTab->addTab( spatial, qtr( "Spatializer" ) );
-    audioLayout->addWidget( audioTab );
 
     StereoWidener *stereowiden = new StereoWidener( p_intf, audioTab );
     CONNECT( stereowiden, configChanged(QString, QVariant), this, putAudioConfig(QString, QVariant) );
     audioTab->addTab( stereowiden, qtr( "Stereo Widener" ) );
-    audioLayout->addWidget( audioTab );
 
     QWidget *advancedTab = new QWidget;
     QGridLayout *advancedTabLayout = new QGridLayout;
@@ -95,6 +93,7 @@ ExtendedDialog::ExtendedDialog( qt_intf_t *_p_intf )
 
     advancedTab->setLayout( advancedTabLayout );
     audioTab->addTab( advancedTab, qtr( "Advanced" ) );
+
     audioLayout->addWidget( audioTab );
 
     mainTabW->insertTab( AUDIO_TAB, audioWidget, qtr( "Audio Effects" ) );
@@ -111,7 +110,7 @@ ExtendedDialog::ExtendedDialog( qt_intf_t *_p_intf )
 
     mainTabW->insertTab( VIDEO_TAB, videoWidget, qtr( "Video Effects" ) );
 
-    syncW = new SyncControls( p_intf, videoTab );
+    syncW = new SyncControls( p_intf, mainTabW );
     mainTabW->insertTab( SYNCHRO_TAB, syncW, qtr( "Synchronization" ) );
 
     if( module_exists( "v4l2" ) )
@@ -181,9 +180,13 @@ void ExtendedDialog::currentTabChanged( int i )
     {
         m_applyButton->setVisible( true );
         m_applyButton->setEnabled( !m_hashConfigs[i].isEmpty() );
+        m_applyButton->setFocusPolicy( Qt::StrongFocus );
     }
     else
+    {
         m_applyButton->setVisible( false );
+        m_applyButton->setFocusPolicy( Qt::NoFocus );
+    }
 }
 
 void ExtendedDialog::putAudioConfig( const QString& name, const QVariant value )



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/55d82a583216214b0081e6be08d06a357e2478ad...f50f7fee6f89ece49cf69ad856571b733b486440

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/55d82a583216214b0081e6be08d06a357e2478ad...f50f7fee6f89ece49cf69ad856571b733b486440
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list