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