Commit 342f1a74 authored by Ludovic Fauvet's avatar Ludovic Fauvet

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

(cherry picked from commit 697766fe84fc6fa94f1bef61dbf0193991474a58)
parent e3f22512
......@@ -56,8 +56,6 @@ TimeTooltip::TimeTooltip( QWidget *parent ) :
// Set default text
setText( "00:00:00", "" );
mInitialized = false;
// By default the widget is unintialized and should not be displayed
resize( 0, 0 );
}
......@@ -119,7 +117,6 @@ void TimeTooltip::buildPath()
void TimeTooltip::setText( const QString& time, const QString& text )
{
mInitialized = true;
mDisplayedText = time;
if ( !text.isEmpty() )
mDisplayedText.append( " - " ).append( text );
......@@ -130,18 +127,13 @@ void TimeTooltip::setText( const QString& time, const QString& text )
mTime = time;
mText = text;
update();
raise();
}
void TimeTooltip::show()
{
setVisible( true );
#ifdef Q_WS_PM
// 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 * )
......
......@@ -52,7 +52,6 @@ private:
QPainterPath mPainterPath;
QBitmap mMask;
int mPreviousMetricsWidth;
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