diff options
Diffstat (limited to 'src/tabpreviewpopup.cpp')
-rw-r--r-- | src/tabpreviewpopup.cpp | 9 |
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 +} |