|
|
|
|
@ -167,6 +167,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM |
|
|
|
|
int width = textRect.width(), |
|
|
|
|
height = textRect.height(), |
|
|
|
|
textXOffset = 0, |
|
|
|
|
iconXOffset = 0, |
|
|
|
|
shadowOffset = message.isRightToLeft() ? -1 : 1; |
|
|
|
|
|
|
|
|
|
// load icon (if set) and update geometry
|
|
|
|
|
@ -191,8 +192,15 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM |
|
|
|
|
symbol = SmallIcon( "dialog-information" ); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
textXOffset = 2 + symbol.width(); |
|
|
|
|
width += textXOffset; |
|
|
|
|
if ( QApplication::isRightToLeft() ) |
|
|
|
|
{ |
|
|
|
|
iconXOffset = 2 + textRect.width(); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
textXOffset = 2 + symbol.width(); |
|
|
|
|
} |
|
|
|
|
width += 2 + symbol.width(); |
|
|
|
|
height = qMax( height, symbol.height() ); |
|
|
|
|
} |
|
|
|
|
QRect geometry( 0, 0, width + 10, height + 8 ); |
|
|
|
|
@ -219,7 +227,7 @@ void PageViewMessage::display( const QString & message, Icon icon, int durationM |
|
|
|
|
|
|
|
|
|
// draw icon if present
|
|
|
|
|
if ( !symbol.isNull() ) |
|
|
|
|
bufferPainter.drawPixmap( 5, 4, symbol, 0, 0, symbol.width(), symbol.height() ); |
|
|
|
|
bufferPainter.drawPixmap( 5 + iconXOffset, 4, symbol, 0, 0, symbol.width(), symbol.height() ); |
|
|
|
|
|
|
|
|
|
// draw shadow and text
|
|
|
|
|
int yText = geometry.height() - height / 2; |
|
|
|
|
|