Pin tool cleanup
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user