[vlc-commits] Qt, fsc: fix opacity when mouseover

Jean-Baptiste Kempf git at videolan.org
Tue Apr 26 02:10:51 CEST 2011


vlc/vlc-1.1 | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Tue Apr 26 02:08:20 2011 +0200| [8550b894b082ad648d95c1a39737faf8b686fd46] | committer: Jean-Baptiste Kempf

Qt, fsc: fix opacity when mouseover

And close #4542
(cherry picked from commit d3c77e33205db2859a6d1f1594ae8efd82e7fd3b)

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

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

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

diff --git a/modules/gui/qt4/components/controller.cpp b/modules/gui/qt4/components/controller.cpp
index c4d5fa1..e186f1d 100644
--- a/modules/gui/qt4/components/controller.cpp
+++ b/modules/gui/qt4/components/controller.cpp
@@ -682,6 +682,7 @@ FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWi
 #if HAVE_TRANSPARENCY
     p_slowHideTimer = new QTimer( this );
     CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
+    f_opacity = var_InheritFloat( p_intf, "qt-fs-opacity" )
 #endif
 
     vlc_mutex_init_recursive( &lock );
@@ -750,7 +751,7 @@ void FullscreenControllerWidget::showFSC()
     }
 
 #if HAVE_TRANSPARENCY
-    setWindowOpacity( var_InheritFloat( p_intf, "qt-fs-opacity" )  );
+    setWindowOpacity( f_opacity );
 #endif
 
 #ifdef Q_WS_X11
@@ -911,7 +912,7 @@ void FullscreenControllerWidget::enterEvent( QEvent *event )
     p_hideTimer->stop();
 #if HAVE_TRANSPARENCY
     p_slowHideTimer->stop();
-    setWindowOpacity( DEFAULT_OPACITY );
+    setWindowOpacity( f_opacity );
 #endif
     event->accept();
 }
diff --git a/modules/gui/qt4/components/controller.hpp b/modules/gui/qt4/components/controller.hpp
index 0bfa70e..5ba97d4 100644
--- a/modules/gui/qt4/components/controller.hpp
+++ b/modules/gui/qt4/components/controller.hpp
@@ -265,6 +265,7 @@ private:
     QTimer *p_slowHideTimer;
     bool b_slow_hide_begin;
     int  i_slow_hide_timeout;
+    float f_opacity;
 #endif
 
     int i_mouse_last_x, i_mouse_last_y;



More information about the vlc-commits mailing list