b58843030c
now only has one button entry, "ButtonBg", instead of 3. It's up to the client what to do with it. All the clients are updated except mwm. As the author noted in his README, mwm isn't Motif window manager at all but KStep ;-) I disabled it for now until there is new drawing code in there, it would confuse users anyways since were about to release another Krash and it is identical to KStep. Also, I removed the Groove and GrooveText color entries. We now use the normal TitleBar and Font entries. Hence system will probably look funny until you adjust the colors since it draws text on the frame and not the titlebar bg. All the rest look much better by default. To configure button colors set the active/inactive button background color in KControl. I'll remove the other entries ASAP. You'll also note that the active/inactive colors are now actually what you would expect. svn path=/trunk/kdebase/kwin/; revision=47753
56 lines
1.3 KiB
C++
56 lines
1.3 KiB
C++
#ifndef __LAPTOPCLIENT_H
|
|
#define __LAPTOPCLIENT_H
|
|
|
|
#include <qbutton.h>
|
|
#include <qbitmap.h>
|
|
#include <kpixmap.h>
|
|
#include "../../client.h"
|
|
class QLabel;
|
|
class QSpacerItem;
|
|
|
|
|
|
// get rid of autohide :P
|
|
class SystemButton : public QButton
|
|
{
|
|
public:
|
|
SystemButton(int w, int h, Client *parent=0, const char *name=0,
|
|
const unsigned char *bitmap=NULL);
|
|
void setBitmap(const unsigned char *bitmap);
|
|
void reset();
|
|
//QSize sizeHint() const;
|
|
protected:
|
|
virtual void drawButton(QPainter *p);
|
|
void drawButtonLabel(QPainter *){;}
|
|
QBitmap deco;
|
|
Client *client;
|
|
};
|
|
|
|
class LaptopClient : public Client
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
LaptopClient( Workspace *ws, WId w, QWidget *parent=0, const char *name=0 );
|
|
~LaptopClient(){;}
|
|
protected:
|
|
void resizeEvent( QResizeEvent* );
|
|
void paintEvent( QPaintEvent* );
|
|
void showEvent( QShowEvent* );
|
|
void windowWrapperShowEvent( QShowEvent* );
|
|
void mouseDoubleClickEvent( QMouseEvent * );
|
|
void init();
|
|
void captionChange( const QString& name );
|
|
void stickyChange(bool on);
|
|
void maximizeChange(bool m);
|
|
void doShape();
|
|
void activeChange(bool);
|
|
protected slots:
|
|
void slotReset();
|
|
private:
|
|
SystemButton* button[5];
|
|
QSpacerItem* titlebar;
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|