kwin/clients/laptop/laptopclient.h
Daniel M. Duley 0c77d7383e Trying to make the titlebar buttons easier to hit on laptops by increasing the
width. The issue here is I want to make the buttons as wide as possible for
laptop mice without having the titlebar be all buttons and no title ;-) My
solution so far is making the common buttons bigger and the uncommon ones
smaller. It's not consistent but let's me make the areas frequently hit
wide as hell, which is good for a laptop :) Close, iconify, and maximize are
larger - sticky and help are smaller.

Another updated shot is at:
http://www.mosfet.org/kwinlaptop.gif

svn path=/trunk/kdebase/kwin/; revision=44698
2000-03-25 21:37:49 +00:00

55 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, QWidget *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 *){;}
KPixmap aBackground, iBackground;
QBitmap deco;
};
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();
protected slots:
void slotReset();
private:
SystemButton* button[5];
QSpacerItem* titlebar;
};
#endif