summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTorsten Rahn <rahn@kde.org>2016-10-05 14:39:29 (GMT)
committerTorsten Rahn <trahn@testo.de>2016-10-05 14:40:17 (GMT)
commitfa8ed7041dd3b74dddf089baa8ca7275483a6e24 (patch)
tree5e99d9d6dc0b99396471b086498170a27a77c6b6
parente34e2833aa6a7555bd4fe9aa370686868d1b96f2 (diff)
Initial fix for webpopup appearance.
-rw-r--r--data/bitmaps/webpopup/webpopup2_shadow.pngbin929 -> 962 bytes
-rw-r--r--src/lib/marble/PopupItem.cpp22
2 files changed, 11 insertions, 11 deletions
diff --git a/data/bitmaps/webpopup/webpopup2_shadow.png b/data/bitmaps/webpopup/webpopup2_shadow.png
index 4745ea8..4675b35 100644
--- a/data/bitmaps/webpopup/webpopup2_shadow.png
+++ b/data/bitmaps/webpopup/webpopup2_shadow.png
Binary files differ
diff --git a/src/lib/marble/PopupItem.cpp b/src/lib/marble/PopupItem.cpp
index fff1601..68fad7e 100644
--- a/src/lib/marble/PopupItem.cpp
+++ b/src/lib/marble/PopupItem.cpp
@@ -45,7 +45,7 @@ PopupItem::PopupItem( QObject* parent ) :
{
setCacheMode( ItemCoordinateCache );
setVisible( false );
- setSize( QSizeF( 240.0, 320.0 ) );
+ setSize( QSizeF( 300.0, 320.0 ) );
m_ui.setupUi( m_widget );
@@ -167,8 +167,8 @@ void PopupItem::paint( QPainter *painter )
if ( alignment() & Qt::AlignRight ) {
popupRect.setRect( image.width() - 13, -10,
- size().width() - ( image.width() - 23 ),
- size().height() + 20 );
+ size().width() - ( image.width() - 3 ),
+ size().height() );
qDrawBorderPixmap(painter, popupRect, QMargins( 20, 20, 20, 20 ),
pixmap("marble/webpopup/webpopup2"));
if ( alignment() & Qt::AlignTop ) {
@@ -184,8 +184,8 @@ void PopupItem::paint( QPainter *painter )
m_widget->render( painter, QPoint( image.width() - 3, 0 ), QRegion() );
} else if ( alignment() & Qt::AlignLeft ) {
popupRect.setRect( -10, -10,
- size().width() - ( image.width() - 23 ),
- size().height() + 20 );
+ size().width() - ( image.width() - 3 ),
+ size().height() );
qDrawBorderPixmap(painter, popupRect, QMargins( 20, 20, 20, 20 ),
pixmap("marble/webpopup/webpopup2"));
if ( alignment() & Qt::AlignTop ) {
@@ -207,8 +207,8 @@ void PopupItem::paint( QPainter *painter )
if ( alignment() & Qt::AlignTop )
{
image = pixmap("marble/webpopup/arrow2_vertical_bottomright");
- popupRect.setRect( -10, -10, size().width() + 20,
- size().height() - image.height() + 23 );
+ popupRect.setRect( -10, -10, size().width(),
+ size().height() - image.height() + 3 );
qDrawBorderPixmap(painter, popupRect, QMargins( 20, 20, 20, 20 ),
pixmap("marble/webpopup/webpopup2"));
painter->drawPixmap( size().width() / 2 - image.width(),
@@ -216,15 +216,15 @@ void PopupItem::paint( QPainter *painter )
m_widget->render( painter, QPoint( 0, 0 ), QRegion() );
} else if ( alignment() & Qt::AlignBottom ) {
image = pixmap("marble/webpopup/arrow2_vertical_topleft");
- popupRect.setRect( -10, image.height() - 13, size().width() + 20,
- size().height() - image.height() + 23 );
+ popupRect.setRect( -10, image.height() - 13, size().width(),
+ size().height() - image.height() + 3 );
qDrawBorderPixmap(painter, popupRect, QMargins( 20, 20, 20, 20 ),
pixmap("marble/webpopup/webpopup2"));
painter->drawPixmap( size().width() / 2, 0, image );
m_widget->render( painter, QPoint( 5, image.height() - 7 ), QRegion() );
} else { // for no horizontal align value and Qt::AlignVCenter
- popupRect.setRect( -10, -10, size().width() + 20,
- size().height() + 20 );
+ popupRect.setRect( -10, -10, size().width(),
+ size().height());
qDrawBorderPixmap(painter, popupRect, QMargins( 20, 20, 20, 20 ),
pixmap("marble/webpopup/webpopup2"));
m_widget->render( painter, QPoint( 0, 0 ), QRegion() );