Pin tool cleanup

This commit is contained in:
lupoDharkael
2018-05-03 18:53:13 +02:00
parent fe8a43a02a
commit c68179f64c
3 changed files with 11 additions and 15 deletions

View File

@@ -26,19 +26,20 @@ PinWidget::PinWidget(const QPixmap &pixmap, QWidget *parent) :
QWidget(parent), m_pixmap(pixmap)
{
setWindowFlags(Qt::WindowStaysOnTopHint
| Qt::FramelessWindowHint
| Qt::Tool
| Qt::X11BypassWindowManagerHint);
| Qt::FramelessWindowHint);
//set the bottom widget background transparent
setAttribute(Qt::WA_TranslucentBackground);
m_shadowEffect->setColor(Qt::lightGray);
m_shadowEffect->setBlurRadius(2 * LAYOUT_MARGIN);
m_shadowEffect->setOffset(0, 0);
setGraphicsEffect(m_shadowEffect);
m_layout = new QVBoxLayout(this);
m_layout->setContentsMargins(LAYOUT_MARGIN, LAYOUT_MARGIN, LAYOUT_MARGIN, LAYOUT_MARGIN);
const int margin = 7;
m_layout->setContentsMargins(margin, margin, margin, margin);
m_shadowEffect = new QGraphicsDropShadowEffect(this);
m_shadowEffect->setColor(Qt::lightGray);
m_shadowEffect->setBlurRadius(2 * margin);
m_shadowEffect->setOffset(0, 0);
setGraphicsEffect(m_shadowEffect);
m_label = new QLabel();
m_label->setPixmap(m_pixmap);