* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
p_hideTimer->setSingleShot( true );
/* slow hiding timer */
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
p_slowHideTimer = new QTimer( this );
CONNECT( p_slowHideTimer, timeout(), this, slowHideFSC() );
- #endif
+#endif
adjustSize (); /* need to get real width and height for moving */
#endif
}
-#ifdef TRANSPARENCY
/**
* Hidding fullscreen controller slowly
* Linux: need composite manager
*/
void FullscreenControllerWidget::slowHideFSC()
{
+#if HAVE_TRANSPARENCY
static bool first_call = true;
if ( first_call )
p_slowHideTimer->stop();
}
}
-}
#endif
+}
/**
* Get state of visibility of FS controller on screen
show();
#endif
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
setWindowOpacity( 0.75 );
- #endif
+#endif
}
else if ( type == FullscreenControlHide_Type )
{
else if ( type == FullscreenControlPlanHide_Type && !b_mouseIsOver )
{
p_hideTimer->start( i_hideTimeout );
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
p_slowHideTimer->start( i_hideTimeout / 2 );
- #endif
+#endif
}
}
void FullscreenControllerWidget::enterEvent( QEvent *event )
{
p_hideTimer->stop();
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
p_slowHideTimer->stop();
- #endif
+#endif
b_mouseIsOver = true;
}
void FullscreenControllerWidget::leaveEvent( QEvent *event )
{
p_hideTimer->start( i_hideTimeout );
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
p_slowHideTimer->start( i_hideTimeout / 2 );
- #endif
+#endif
b_mouseIsOver = false;
}
#include <QWidget>
#include <QFrame>
+
#define VOLUME_MAX 200
/* on WIN32 hide() for fullscreen controller doesnt work, so it have to be
#endif
/* to trying transparency with fullscreen controller on windows enable that */
-/* #define TRANSPARENCY */
-
-/* it can be enabled on non windows systems,
+#define HAVE_TRANSPARENCY 0
+/* it can be enabled on-non windows systems,
but it will be transparent only with composite manager */
#ifndef WIN32
- #define TRANSPARENCY
+ #define HAVE_TRANSPARENCY 1
#endif
-
class ResizeEvent;
class QPalette;
class QPixmap;
private slots:
void hideFSControllerWidget();
-
- #ifdef TRANSPARENCY
void slowHideFSC();
- #endif
private:
QTimer *p_hideTimer;
- #ifdef TRANSPARENCY
+#if HAVE_TRANSPARENCY
QTimer *p_slowHideTimer;
- #endif
+#endif
int i_lastPosX;
int i_lastPosY;
int i_hideTimeout; /* FSC hiding timeout, same as mouse hiding timeout */
bool b_mouseIsOver;
- #ifdef WIN32TRICK
+#ifdef WIN32TRICK
bool fscHidden;
- #endif
+#endif
virtual void customEvent( QEvent *event );
};