add drop shadow to Toggle thumb

This commit is contained in:
laserpants 2016-03-27 11:02:58 +03:00
parent 58a54c50fb
commit 17b49b58fb
1 changed files with 3 additions and 3 deletions

View File

@ -20,7 +20,7 @@ bool Thumb::eventFilter(QObject *obj, QEvent *event)
{ {
const QEvent::Type type = event->type(); const QEvent::Type type = event->type();
if (QEvent::Resize == type || QEvent::Move == type) { if (QEvent::Resize == type || QEvent::Move == type) {
setGeometry(parentWidget()->rect()); setGeometry(parentWidget()->rect().adjusted(2, 2, -2, -2));
} }
return QWidget::eventFilter(obj, event); return QWidget::eventFilter(obj, event);
} }
@ -54,8 +54,8 @@ Toggle::Toggle(QWidget *parent)
_overlay(new RippleOverlay(this)), _overlay(new RippleOverlay(this)),
_thumb(new Thumb(this)) _thumb(new Thumb(this))
{ {
// CustomShadowEffect *effect = new CustomShadowEffect; CustomShadowEffect *effect = new CustomShadowEffect;
// _thumb->setGraphicsEffect(effect); _thumb->setGraphicsEffect(effect);
} }
Toggle::~Toggle() Toggle::~Toggle()