Commit 697766fe authored by Ludovic Fauvet's avatar Ludovic Fauvet

Qt: raise the tooltip so it stays in front of the fullscreen controller

parent 9653db32
......@@ -31,7 +31,7 @@
#define TIP_HEIGHT 5
TimeTooltip::TimeTooltip( QWidget *parent ) :
QWidget( parent ), mInitialized( false )
QWidget( parent )
{
setWindowFlags( Qt::Window |
Qt::WindowStaysOnTopHint |
......@@ -132,7 +132,6 @@ void TimeTooltip::buildPath()
void TimeTooltip::setTip( const QPoint& target, const QString& time, const QString& text )
{
mInitialized = true;
mDisplayedText = time;
if ( !text.isEmpty() )
mDisplayedText.append( " - " ).append( text );
......@@ -146,18 +145,13 @@ void TimeTooltip::setTip( const QPoint& target, const QString& time, const QStri
}
update();
raise();
}
void TimeTooltip::show()
{
setVisible( true );
#ifdef Q_OS_OS2
// Bring a tooltip on the top
// Without this, tooltip does not appear on fullscreen
// from the second fullscreen state change
if( mInitialized )
QWidget::raise();
#endif
raise();
}
void TimeTooltip::paintEvent( QPaintEvent * )
......
......@@ -54,7 +54,6 @@ private:
QPainterPath mPainterPath;
QBitmap mMask;
int mTipX;
bool mInitialized;
};
#endif // TIMETOOLTIP_H
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