Remove noDrag madness.
This commit is contained in:
parent
56dd4cf3ee
commit
f58f03f19e
9 changed files with 3 additions and 51 deletions
19
Button.cpp
19
Button.cpp
|
|
@ -14,7 +14,6 @@ Button::Button (QWidget *parent, uint normal, uint pressed, bool pls) : PixWidge
|
|||
m_name_pressed = pressed;
|
||||
m_diffx = 0;
|
||||
m_diffy = 0;
|
||||
m_nodrag = false;
|
||||
m_pls = pls;
|
||||
}
|
||||
|
||||
|
|
@ -54,36 +53,18 @@ Button::setPixmaps(Skin *skin)
|
|||
void
|
||||
Button::mousePressEvent (QMouseEvent *event)
|
||||
{
|
||||
MainWindow *mw = dynamic_cast<MainWindow *>(window ());
|
||||
if (mw) {
|
||||
mw->setNoDrag (true);
|
||||
} else {
|
||||
PlaylistWindow *pw = dynamic_cast<PlaylistWindow *>(window ());
|
||||
pw->setNoDrag (true);
|
||||
}
|
||||
|
||||
m_pixmap = m_pixmap_pressed;
|
||||
|
||||
m_diffx = event->pos().x();
|
||||
m_diffy = event->pos().y();
|
||||
|
||||
m_nodrag = true;
|
||||
|
||||
update ();
|
||||
}
|
||||
|
||||
void
|
||||
Button::mouseReleaseEvent (QMouseEvent *event)
|
||||
{
|
||||
MainWindow *mw = dynamic_cast<MainWindow *>(window ());
|
||||
if (mw) {
|
||||
mw->setNoDrag (true);
|
||||
} else {
|
||||
PlaylistWindow *pw = dynamic_cast<PlaylistWindow *>(window ());
|
||||
pw->setNoDrag (true);
|
||||
}
|
||||
m_pixmap = m_pixmap_normal;
|
||||
m_nodrag = false;
|
||||
update();
|
||||
emit clicked();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue