mirror of https://code.videolan.org/videolan/vlc
Disable focus on buttons to avoid "space" to be catched by a button on focus.
Moreover, use a function instead of a macro (like in 0.9-branch) Partially cherry picked from commit 73ab1cd94773956e463009088bf5f477cec1ae80
This commit is contained in:
parent
ec2e9e013e
commit
958f28497c
|
@ -306,10 +306,13 @@ void VisualSelector::next()
|
|||
* TEH controls
|
||||
**********************************************************************/
|
||||
|
||||
#define setupSmallButton( aButton ){ \
|
||||
aButton->setMaximumSize( QSize( 26, 26 ) ); \
|
||||
aButton->setMinimumSize( QSize( 26, 26 ) ); \
|
||||
aButton->setIconSize( QSize( 20, 20 ) ); }
|
||||
static void setupSmallButton( QPushButton *aButton )
|
||||
{
|
||||
aButton->setMaximumSize( QSize( 26, 26 ) );
|
||||
aButton->setMinimumSize( QSize( 26, 26 ) );
|
||||
aButton->setIconSize( QSize( 20, 20 ) );
|
||||
aButton->setFocusPolicy( Qt::NoFocus );
|
||||
}
|
||||
|
||||
/* init static variables in advanced controls */
|
||||
mtime_t AdvControlsWidget::timeA = 0;
|
||||
|
@ -518,12 +521,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
|
|||
slowerButton = new QToolButton;
|
||||
slowerButton->setAutoRaise( true );
|
||||
slowerButton->setMaximumSize( QSize( 26, 20 ) );
|
||||
slowerButton->setFocusPolicy( Qt::NoFocus );
|
||||
|
||||
BUTTON_SET_ACT( slowerButton, "-", qtr( "Slower" ), slower() );
|
||||
|
||||
fasterButton = new QToolButton;
|
||||
fasterButton->setAutoRaise( true );
|
||||
fasterButton->setMaximumSize( QSize( 26, 20 ) );
|
||||
fasterButton->setFocusPolicy( Qt::NoFocus );
|
||||
|
||||
BUTTON_SET_ACT( fasterButton, "+", qtr( "Faster" ), faster() );
|
||||
|
||||
|
@ -634,7 +639,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
|
|||
playButton->setMaximumSize( QSize( 36, 36 ) );
|
||||
playButton->setMinimumSize( QSize( 36, 36 ) );
|
||||
playButton->setIconSize( QSize( 30, 30 ) );
|
||||
|
||||
playButton->setFocusPolicy( Qt::NoFocus );
|
||||
|
||||
/** Prev + Stop + Next Block **/
|
||||
controlButLayout = new QHBoxLayout;
|
||||
|
|
Loading…
Reference in New Issue