[vlc-devel] commit: Disable focus on buttons to avoid "space" to be catched by a button on focus. (Jean-Baptiste Kempf )
git version control
git at videolan.org
Thu Sep 18 06:24:58 CEST 2008
vlc | branch: 0.9-bugfix | Jean-Baptiste Kempf <jb at videolan.org> | Wed Sep 17 20:21:02 2008 -0700| [73ab1cd94773956e463009088bf5f477cec1ae80] | committer: Jean-Baptiste Kempf
Disable focus on buttons to avoid "space" to be catched by a button on focus.
Space is Play/Pause. ALWAYS
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=73ab1cd94773956e463009088bf5f477cec1ae80
---
modules/gui/qt4/components/interface_widgets.cpp | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index 777da16..e47772d 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -317,7 +317,9 @@ void VisualSelector::next()
#define setupSmallButton( aButton ){ \
aButton->setMaximumSize( QSize( 26, 26 ) ); \
aButton->setMinimumSize( QSize( 26, 26 ) ); \
- aButton->setIconSize( QSize( 20, 20 ) ); }
+ aButton->setIconSize( QSize( 20, 20 ) ); \
+ aButton->setFocusPolicy( Qt::NoFocus ); \
+}
/* init static variables in advanced controls */
mtime_t AdvControlsWidget::timeA = 0;
@@ -527,12 +529,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() );
@@ -643,7 +647,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;
More information about the vlc-devel
mailing list