Commit 958f2849 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

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 73ab1cd9
parent ec2e9e01
...@@ -306,10 +306,13 @@ void VisualSelector::next() ...@@ -306,10 +306,13 @@ void VisualSelector::next()
* TEH controls * TEH controls
**********************************************************************/ **********************************************************************/
#define setupSmallButton( aButton ){ \ static void setupSmallButton( QPushButton *aButton )
aButton->setMaximumSize( QSize( 26, 26 ) ); \ {
aButton->setMinimumSize( QSize( 26, 26 ) ); \ aButton->setMaximumSize( QSize( 26, 26 ) );
aButton->setIconSize( QSize( 20, 20 ) ); } aButton->setMinimumSize( QSize( 26, 26 ) );
aButton->setIconSize( QSize( 20, 20 ) );
aButton->setFocusPolicy( Qt::NoFocus );
}
/* init static variables in advanced controls */ /* init static variables in advanced controls */
mtime_t AdvControlsWidget::timeA = 0; mtime_t AdvControlsWidget::timeA = 0;
...@@ -518,12 +521,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -518,12 +521,14 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
slowerButton = new QToolButton; slowerButton = new QToolButton;
slowerButton->setAutoRaise( true ); slowerButton->setAutoRaise( true );
slowerButton->setMaximumSize( QSize( 26, 20 ) ); slowerButton->setMaximumSize( QSize( 26, 20 ) );
slowerButton->setFocusPolicy( Qt::NoFocus );
BUTTON_SET_ACT( slowerButton, "-", qtr( "Slower" ), slower() ); BUTTON_SET_ACT( slowerButton, "-", qtr( "Slower" ), slower() );
fasterButton = new QToolButton; fasterButton = new QToolButton;
fasterButton->setAutoRaise( true ); fasterButton->setAutoRaise( true );
fasterButton->setMaximumSize( QSize( 26, 20 ) ); fasterButton->setMaximumSize( QSize( 26, 20 ) );
fasterButton->setFocusPolicy( Qt::NoFocus );
BUTTON_SET_ACT( fasterButton, "+", qtr( "Faster" ), faster() ); BUTTON_SET_ACT( fasterButton, "+", qtr( "Faster" ), faster() );
...@@ -634,7 +639,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i, ...@@ -634,7 +639,7 @@ ControlsWidget::ControlsWidget( intf_thread_t *_p_i,
playButton->setMaximumSize( QSize( 36, 36 ) ); playButton->setMaximumSize( QSize( 36, 36 ) );
playButton->setMinimumSize( QSize( 36, 36 ) ); playButton->setMinimumSize( QSize( 36, 36 ) );
playButton->setIconSize( QSize( 30, 30 ) ); playButton->setIconSize( QSize( 30, 30 ) );
playButton->setFocusPolicy( Qt::NoFocus );
/** Prev + Stop + Next Block **/ /** Prev + Stop + Next Block **/
controlButLayout = new QHBoxLayout; controlButLayout = new QHBoxLayout;
......
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