Fix cursor shape over titlebar buttons.

svn path=/trunk/kdebase/kwin/; revision=316901
This commit is contained in:
Luciano Montanaro 2004-06-01 23:32:28 +00:00
parent f94533b394
commit 8b9735cfd1

View file

@ -1124,6 +1124,7 @@ B2Button::B2Button(B2Client *_client, QWidget *parent,
: QButton(parent, 0), hover(false) : QButton(parent, 0), hover(false)
{ {
setBackgroundMode(NoBackground); setBackgroundMode(NoBackground);
setCursor(arrowCursor);
realizeButtons = realizeBtns; realizeButtons = realizeBtns;
client = _client; client = _client;
useMiniIcon = false; useMiniIcon = false;
@ -1204,17 +1205,20 @@ void B2Button::mouseReleaseEvent(QMouseEvent * e)
QButton::mouseReleaseEvent(&me); QButton::mouseReleaseEvent(&me);
} }
void B2Button::enterEvent(QEvent *) void B2Button::enterEvent(QEvent *e)
{ {
hover = true; hover = true;
repaint(false); repaint(false);
QButton::enterEvent(e);
} }
void B2Button::leaveEvent(QEvent *) void B2Button::leaveEvent(QEvent *e)
{ {
hover = false; hover = false;
repaint(false); repaint(false);
QButton::leaveEvent(e);
} }
// ===================================== // =====================================
B2Titlebar::B2Titlebar(B2Client *parent) B2Titlebar::B2Titlebar(B2Client *parent)