summaryrefslogtreecommitdiff
path: root/src/tabpreviewpopup.cpp
diff options
context:
space:
mode:
authorAndrea Diamantini <adjam7@gmail.com>2011-07-18 23:54:43 +0200
committerAndrea Diamantini <adjam7@gmail.com>2011-07-18 23:54:43 +0200
commitfc755c02489f5c52319f5b48d59b753a6c9666b8 (patch)
treeb2372354a8ff02821402214c89e3d7122c737b73 /src/tabpreviewpopup.cpp
parentrekonq 0.7.57 (diff)
downloadrekonq-fc755c02489f5c52319f5b48d59b753a6c9666b8.tar.xz
Pedantic compile fixes
PS: Andrè, thanks for the notice... CCMAIL: Woebbeking@kde.org
Diffstat (limited to 'src/tabpreviewpopup.cpp')
-rw-r--r--src/tabpreviewpopup.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/tabpreviewpopup.cpp b/src/tabpreviewpopup.cpp
index f6ede995..bb438aae 100644
--- a/src/tabpreviewpopup.cpp
+++ b/src/tabpreviewpopup.cpp
@@ -40,6 +40,11 @@
#include <QBitmap>
#include <QPoint>
+// static
+static const int borderRadius = 5;
+static const int borderSpacing = 2;
+static const int transparency = 0.90;
+
TabPreviewPopup::TabPreviewPopup(WebTab* tab, QWidget* parent)
: KPassivePopup(parent),
@@ -96,7 +101,7 @@ void TabPreviewPopup::setUrl(const QString& text)
void TabPreviewPopup::setFixedSize(int w, int h)
{
KPassivePopup::setFixedSize(w, h);
- m_url->setText(m_url->fontMetrics().elidedText(m_url->text(), Qt::ElideMiddle, this->width() - this->borderRadius));
+ m_url->setText(m_url->fontMetrics().elidedText(m_url->text(), Qt::ElideMiddle, this->width() - borderRadius));
QPixmap pixmap(size());
QPainter painter(&pixmap);
@@ -105,4 +110,4 @@ void TabPreviewPopup::setFixedSize(int w, int h)
painter.setBrush(QBrush(Qt::black));
painter.drawRoundRect(borderSpacing, borderSpacing, pixmap.width() - borderSpacing * 2, pixmap.height() - borderSpacing * 2, borderRadius, borderRadius);
setMask(pixmap.createMaskFromColor(Qt::red));
-} \ No newline at end of file
+}