[vlc-devel] commit: Fix of showing FS controller when it is slowly hidding ( Lukas Durfina )

git version control git at videolan.org
Wed Jun 11 17:15:23 CEST 2008


vlc | branch: master | Lukas Durfina <lukas.durfina at gmail.com> | Wed Jun 11 12:29:10 2008 +0200| [e39bc8a53f6217f817a1e8dabbcd1c7e292bc545]

Fix of showing FS controller when it is slowly hidding

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e39bc8a53f6217f817a1e8dabbcd1c7e292bc545
---

 modules/gui/qt4/components/interface_widgets.cpp |    4 ++--
 modules/gui/qt4/components/interface_widgets.hpp |    3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt4/components/interface_widgets.cpp b/modules/gui/qt4/components/interface_widgets.cpp
index d90ef76..6c2abac 100644
--- a/modules/gui/qt4/components/interface_widgets.cpp
+++ b/modules/gui/qt4/components/interface_widgets.cpp
@@ -975,7 +975,7 @@ void FullscreenControllerWidget::customEvent( QEvent *event )
         #endif
 
 #if HAVE_TRANSPARENCY
-        setWindowOpacity( 0.75 );
+        setWindowOpacity( DEFAULT_OPACITY );
 #endif
     }
     else if ( type == FullscreenControlHide_Type )
@@ -1122,7 +1122,7 @@ static int showFullscreenControllCallback( vlc_object_t *vlc_object, const char
 {
     FullscreenControllerWidget *p_fs = (FullscreenControllerWidget *) data;
 
-    if ( p_fs->isFSCHidden() )
+    if ( p_fs->isFSCHidden() || p_fs->windowOpacity() < DEFAULT_OPACITY )
     {
         IMEvent *event = new IMEvent( FullscreenControlShow_Type, 0 );
         QApplication::postEvent( p_fs, static_cast<QEvent *>(event) );
diff --git a/modules/gui/qt4/components/interface_widgets.hpp b/modules/gui/qt4/components/interface_widgets.hpp
index 512e15f..9767483 100644
--- a/modules/gui/qt4/components/interface_widgets.hpp
+++ b/modules/gui/qt4/components/interface_widgets.hpp
@@ -57,6 +57,9 @@
     #define HAVE_TRANSPARENCY 1
 #endif
 
+/* Default value of opacity for FS controller */
+#define DEFAULT_OPACITY 0.75
+
 class ResizeEvent;
 class QPalette;
 class QPixmap;




More information about the vlc-devel mailing list