it basically works now

svn path=/trunk/kdebase/kwin/; revision=98909
This commit is contained in:
Lennart Kudling 2001-05-26 20:56:20 +00:00
parent 2ade4cc7ec
commit fa39ba305a
2 changed files with 9 additions and 5 deletions

View file

@ -13,8 +13,8 @@
using namespace KWinInternal;
const int s_frameWidth = 5;
const int s_buttonSize = 19;
static const int s_frameWidth = 5;
static const int s_buttonSize = 19;
MwmButton::MwmButton( MwmClient* parent, const char* name, int btnType )
@ -137,9 +137,12 @@ void MwmClient::menuButtonPressed()
t = new QTime;
if ( tc != this || t->elapsed() > QApplication::doubleClickInterval() )
{
workspace()->clientPopup( this )->popup(
button[BtnMenu]->mapToGlobal(
button[BtnMenu]->rect().bottomLeft() ) );
button[BtnMenu]->animateClick();
}
else
closeWindow();
@ -397,7 +400,7 @@ void MwmClient::paintEvent( QPaintEvent* )
p.setPen( options->color( Options::Font, isActive() ) );
p.drawText(
trect.x() + 3,
trect.y() - 1,
trect.y(),
trect.width() - 6,
trect.height(),
AlignHCenter | AlignVCenter, caption() );

View file

@ -20,9 +20,10 @@ class MwmButton : public QButton
public:
MwmButton( MwmClient* parent=0, const char* name=0, int btnType=0 );
void reset();
protected:
virtual void drawButton(QPainter *p);
void drawButtonLabel(QPainter *){;}
virtual void drawButton( QPainter *p );
private:
MwmClient* m_parent;
int m_btnType;