[prev in list] [next in list] [prev in thread] [next in thread]
List: kwin
Subject: [Kwin] [PATCH] enhanced icewm
From: Oliver Bausinger <bausi () everest ! mathematik ! uni-tuebingen ! de>
Date: 2003-02-07 13:40:31
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
on KDE-Look I found this modification of the kwin-icewm-engine with provides
better support for icewm themes with round corners.
I took the code, cleaned up a bit, and made it work with current CVS HEAD.
As I don't understand much of this drawing stuff, some Kwin guy should have a
deep look at it.
Credits for the code go to: Wolfgang.Roemer@freenet.de
Greetings
Bausi
- --
Stress is when you wake up screaming and
you realize you haven't fallen asleep yet.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE+Q7dVpu0ZQFM3dqERAoTlAKCkFXclccWAVj1DBC7EjerFhSaEIgCgmt21
VUtoAiibXHG2taIrKpuzlNI=
=hIW6
-----END PGP SIGNATURE-----
["icewm2.diff" (text/x-diff)]
Index: icewm.cpp
===================================================================
RCS file: /home/kde/kdeartwork/kwin-styles/icewm/icewm.cpp,v
retrieving revision 1.24
diff -u -3 -p -r1.24 icewm.cpp
--- icewm.cpp 22 Jan 2003 18:55:51 -0000 1.24
+++ icewm.cpp 7 Feb 2003 13:32:55 -0000
@@ -115,6 +115,8 @@ int titleBarHeight;
int borderSizeX;
int borderSizeY;
+bool bROUND_CORNERS = false;
+
bool validframe = false;
bool useActiveShadow = false;
bool useInActiveShadow = false;
@@ -272,6 +274,8 @@ void ThemeHandler::initTheme()
cornerSizeY = config.readNumEntry("CornerSizeY", 24);
titleBarCentered = (bool) config.readNumEntry("TitleBarCentered", 0);
+ bROUND_CORNERS = (bool) config.readNumEntry ("RoundCorners", 1);
+
// Check if readConfig() hasn't overridden this value...
if (!showMenuButtonIcon)
showMenuButtonIcon = (bool) config.readNumEntry("ShowMenuButtonIcon", 0);
@@ -742,7 +746,7 @@ IceWMClient::IceWMClient( Workspace *ws,
grid->addColSpacing(2, borderSizeX);
// Pack the titlebar with spacers and buttons
- hb = new QBoxLayout(0, QBoxLayout::LeftToRight, 0, 0, 0);
+ hb = new QHBoxLayout();
hb->setResizeMode( QLayout::FreeResize );
titleSpacerJ = addPixmapSpacer( titleJ );
@@ -906,25 +910,34 @@ QSpacerItem* IceWMClient::addPixmapSpace
void IceWMClient::renderMenuIcons()
{
- if (validPixmaps(menuButtonPix) && (!miniIcon().isNull()))
- for(int i = 0; i < 2; i++)
- {
- if ( menuButtonWithIconPix[i] )
- delete menuButtonWithIconPix[i];
-
- // Try to be more friendly to dodgy themes - icewm assumes a square menu button
- // but some pixmap themes don't provide a square menu button.
- menuButtonWithIconPix[i] = new QPixmap( titleBarHeight, 2*titleBarHeight );
-
- QPainter pnt( menuButtonWithIconPix[i] );
- pnt.drawPixmap(0, 0, *menuButtonPix[i]);
-
- int offset = (titleBarHeight - miniIcon().width())/2;
- // Paint the mini icon over the menu pixmap in the centre
- pnt.drawPixmap( offset, offset, miniIcon() );
- pnt.drawPixmap( offset, titleBarHeight+offset, miniIcon() );
- pnt.end();
- }
+ if (validPixmaps(menuButtonPix) && (!miniIcon().isNull()))
+ {
+ for(int i = 0; i < 2; i++)
+ {
+ if (menuButtonWithIconPix[i])
+ {
+ delete menuButtonWithIconPix[i];
+ }
+
+ // Try to be more friendly to dodgy themes - icewm assumes a square menu button
+ // but some pixmap themes don't provide a square menu button.
+ menuButtonWithIconPix[i] = new QPixmap (titleBarHeight, 2*titleBarHeight);
+
+ QPainter pnt (menuButtonWithIconPix[i]);
+ pnt.drawPixmap (0, 0, *menuButtonPix[i]);
+
+ if (menuButtonWithIconPix[i] == menuButtonWithIconPix[Active])
+ {
+ int offset = (titleBarHeight - miniIcon().width())/2;
+
+ // Paint the mini icon over the menu pixmap in the centre
+ pnt.drawPixmap( offset, offset, miniIcon() );
+ pnt.drawPixmap( offset, titleBarHeight+offset, miniIcon() );
+ }
+
+ pnt.end();
+ }
+ }
}
@@ -978,200 +991,208 @@ void IceWMClient::resizeEvent( QResizeEv
QApplication::postEvent( this, new QPaintEvent( titlebar->geometry(), FALSE ) );
}
}
+
+ doShape ();
}
// IceWM Paint magic goes here.
void IceWMClient::paintEvent( QPaintEvent* )
{
- QColor colorTitleShadow;
- QColor colorTitle;
- QColor c1;
- int rx, rw;
-
- QPainter p(this);
- int act = isActive() ? Active: InActive;
-
- // Determine titlebar shadow colors
- bool useShadow = isActive() ? useActiveShadow : useInActiveShadow;
- if ( useShadow )
- colorTitleShadow = isActive() ? *colorActiveTitleTextShadow : *colorInActiveTitleTextShadow;
+ QColor colorTitleShadow;
+ QColor colorTitle;
+ QColor c1;
+ int rx, rw;
+
+ QPainter p(this);
+ int act = isActive() ? Active: InActive;
+
+ // Determine titlebar shadow colors
+ bool useShadow = isActive() ? useActiveShadow : useInActiveShadow;
+ if ( useShadow )
+ colorTitleShadow = isActive() ? *colorActiveTitleTextShadow : *colorInActiveTitleTextShadow;
+
+ if ( themeTitleTextColors )
+ colorTitle = isActive()? *colorActiveTitleBarText : *colorInActiveTitleBarText;
+ else
+ colorTitle = options->color(Options::Font, isActive());
+
+ // Obtain widget bounds.
+ QRect r;
+ r = rect();
+ int fillWidth = r.width() - 2*borderSizeX;
+ int y = r.y();
+ int x = r.x();
+ int w = r.width();
+ int h = r.height();
+
+ // Do we have pixmaps for the frame?
+ if (validframe)
+ {
+ // Top corner
+ p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, cornerSizeX, borderSizeY);
+ p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, borderSizeX, cornerSizeY);
+
+ // Top right corner
+ p.drawPixmap(w-cornerSizeX, 0, *frameTR[ act ],
+ frameTR[act]->width()-cornerSizeX, 0, cornerSizeX, borderSizeY);
+ p.drawPixmap(w-borderSizeX, 0, *frameTR[ act ],
+ frameTR[act]->width()-borderSizeX, 0, borderSizeX, cornerSizeY);
+
+ // Top bar
+ p.drawTiledPixmap( cornerSizeX, 0, w-(2*cornerSizeX), borderSizeY, *frameT[ act ] );
+
+ // Left bar
+ p.drawTiledPixmap( 0, cornerSizeY, borderSizeX, h-(2*cornerSizeY), *frameL[ act ] );
+
+ // Right bar
+ p.drawTiledPixmap( w-borderSizeX, cornerSizeY, borderSizeX, h-(2*cornerSizeY),
+ *frameR[ act ],frameR[act]->width()-borderSizeX );
+
+ // Bottom left corner
+ p.drawPixmap(0, h-borderSizeY, *frameBL[ act ],
+ 0, frameBL[act]->height()-borderSizeY, cornerSizeX, borderSizeY);
+ p.drawPixmap(0, h-cornerSizeY, *frameBL[ act ],
+ 0, frameBL[act]->height()-cornerSizeY, borderSizeX, cornerSizeY);
+
+ // Bottom right corner
+ p.drawPixmap(w-cornerSizeX, h-borderSizeY, *frameBR[ act ],
+ frameBR[act]->width()-cornerSizeX, frameBR[act]->height()-borderSizeY,
+ cornerSizeX, borderSizeY);
+
+ p.drawPixmap(w-borderSizeX, h-cornerSizeY, *frameBR[ act ],
+ frameBR[act]->width()-borderSizeX, frameBR[act]->height()-cornerSizeY,
+ borderSizeX, cornerSizeY);
+
+ // Bottom bar
+ p.drawTiledPixmap(cornerSizeX, h-borderSizeY, w-(2*cornerSizeX), borderSizeY,
+ *frameB[ act ], 0, frameB[ act ]->height()-borderSizeY );
+
+ // Ensure uncovered areas during shading are painted with something
+ p.setPen( *colorInActiveBorder );
+ if (titleBarOnTop)
+ p.drawLine( x+borderSizeX, y+h-borderSizeY-1,
+ x+w-borderSizeX-1, y+h-borderSizeY-1);
+ else
+ p.drawLine( x+borderSizeX, y+borderSizeY,
+ x+w-borderSizeX-1, y+borderSizeY);
- if ( themeTitleTextColors )
- colorTitle = isActive()? *colorActiveTitleBarText : *colorInActiveTitleBarText;
- else
- colorTitle = options->color(Options::Font, isActive());
+ }
+ else
+ {
+ // Draw a stock IceWM frame instead of a pixmap frame
+ c1 = isActive() ? *colorActiveBorder : *colorInActiveBorder;
+ p.setPen( c1.light(135) );
+ p.drawLine(0, 0, w-2, 0);
+ p.drawLine(0, 0, 0, h-2);
+
+ p.setPen(c1);
+ p.drawLine(1, 1, w-3, 1);
+ p.drawLine(1, 1, 1, h-3);
+
+ p.setPen( c1.dark(140) );
+ p.drawLine(1, h-2, w-2, h-2);
+ p.drawLine(w-2, 1, w-2, h-2);
+
+ p.setPen( Qt::black );
+ p.drawLine(w-1, 0, w-1, h-1);
+ p.drawLine(0, h-1, w-1, h-1);
- // Obtain widget bounds.
- QRect r;
- r = rect();
- int fillWidth = r.width() - 2*borderSizeX;
- int y = r.y();
- int x = r.x();
- int w = r.width();
- int h = r.height();
-
- // Do we have pixmaps for the frame?
- if (validframe)
- {
- // Top corner
- p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, cornerSizeX, borderSizeY);
- p.drawPixmap(0, 0, *frameTL[ act ], 0, 0, borderSizeX, cornerSizeY);
-
- // Top right corner
- p.drawPixmap(w-cornerSizeX, 0, *frameTR[ act ],
- frameTR[act]->width()-cornerSizeX, 0, cornerSizeX, borderSizeY);
- p.drawPixmap(w-borderSizeX, 0, *frameTR[ act ],
- frameTR[act]->width()-borderSizeX, 0, borderSizeX, cornerSizeY);
-
- // Top bar
- p.drawTiledPixmap( cornerSizeX, 0, w-(2*cornerSizeX), borderSizeY, *frameT[ act ] );
-
- // Left bar
- p.drawTiledPixmap( 0, cornerSizeY, borderSizeX, h-(2*cornerSizeY), *frameL[ act ] );
-
- // Right bar
- p.drawTiledPixmap( w-borderSizeX, cornerSizeY, borderSizeX, h-(2*cornerSizeY),
- *frameR[ act ],frameR[act]->width()-borderSizeX );
-
- // Bottom left corner
- p.drawPixmap(0, h-borderSizeY, *frameBL[ act ],
- 0, frameBL[act]->height()-borderSizeY, cornerSizeX, borderSizeY);
- p.drawPixmap(0, h-cornerSizeY, *frameBL[ act ],
- 0, frameBL[act]->height()-cornerSizeY, borderSizeX, cornerSizeY);
-
- // Bottom right corner
- p.drawPixmap(w-cornerSizeX, h-borderSizeY, *frameBR[ act ],
- frameBR[act]->width()-cornerSizeX, frameBR[act]->height()-borderSizeY,
- cornerSizeX, borderSizeY);
-
- p.drawPixmap(w-borderSizeX, h-cornerSizeY, *frameBR[ act ],
- frameBR[act]->width()-borderSizeX, frameBR[act]->height()-cornerSizeY,
- borderSizeX, cornerSizeY);
-
- // Bottom bar
- p.drawTiledPixmap(cornerSizeX, h-borderSizeY, w-(2*cornerSizeX), borderSizeY,
- *frameB[ act ], 0, frameB[ act ]->height()-borderSizeY );
-
- // Ensure uncovered areas during shading are painted with something
- p.setPen( *colorInActiveBorder );
- if (titleBarOnTop)
- p.drawLine( x+borderSizeX, y+h-borderSizeY-1,
- x+w-borderSizeX-1, y+h-borderSizeY-1);
- else
- p.drawLine( x+borderSizeX, y+borderSizeY,
- x+w-borderSizeX-1, y+borderSizeY);
+ // Fill frame border if required
+ if (borderSizeX > 2)
+ {
+ // Fill Vertical sizes
+ p.fillRect( x+2, y+2, borderSizeX-2, h-4, c1);
+ p.fillRect( w-borderSizeX, y+2, borderSizeX-2, h-4, c1);
+ }
+ if (borderSizeY > 2)
+ {
+ // Fill horizontal frame parts
+ p.fillRect( x+borderSizeX, y+2, fillWidth, borderSizeY-2, c1);
+ p.fillRect( x+borderSizeX, h-borderSizeY, fillWidth, borderSizeY-2, c1);
+ }
- } else
- {
- // Draw a stock IceWM frame instead of a pixmap frame
- c1 = isActive() ? *colorActiveBorder : *colorInActiveBorder;
- p.setPen( c1.light(135) );
- p.drawLine(0, 0, w-2, 0);
- p.drawLine(0, 0, 0, h-2);
-
- p.setPen(c1);
- p.drawLine(1, 1, w-3, 1);
- p.drawLine(1, 1, 1, h-3);
-
- p.setPen( c1.dark(140) );
- p.drawLine(1, h-2, w-2, h-2);
- p.drawLine(w-2, 1, w-2, h-2);
-
- p.setPen( Qt::black );
- p.drawLine(w-1, 0, w-1, h-1);
- p.drawLine(0, h-1, w-1, h-1);
+ // Ensure uncovered areas during shading are painted with something
+ p.setPen( *colorInActiveBorder );
+ if (titleBarOnTop)
+ p.drawLine( x+borderSizeX, y+h-borderSizeY-1,
+ x+w-borderSizeX-1, y+h-borderSizeY-1);
+ else
+ p.drawLine( x+borderSizeX, y+borderSizeY,
+ x+w-borderSizeX-1, y+borderSizeY);
- // Fill frame border if required
- if (borderSizeX > 2)
- {
- // Fill Vertical sizes
- p.fillRect( x+2, y+2, borderSizeX-2, h-4, c1);
- p.fillRect( w-borderSizeX, y+2, borderSizeX-2, h-4, c1);
- }
- if (borderSizeY > 2)
- {
- // Fill horizontal frame parts
- p.fillRect( x+borderSizeX, y+2, fillWidth, borderSizeY-2, c1);
- p.fillRect( x+borderSizeX, h-borderSizeY, fillWidth, borderSizeY-2, c1);
- }
+ if (bROUND_CORNERS)
+ {
+ drawRoundFrame (p, 0, 0, w, h);
+ }
+ }
- // Ensure uncovered areas during shading are painted with something
- p.setPen( *colorInActiveBorder );
- if (titleBarOnTop)
- p.drawLine( x+borderSizeX, y+h-borderSizeY-1,
- x+w-borderSizeX-1, y+h-borderSizeY-1);
- else
- p.drawLine( x+borderSizeX, y+borderSizeY,
- x+w-borderSizeX-1, y+borderSizeY);
- }
+ // Draw the title elements, if we need to draw a titlebar.
+ if (titleBarHeight > 0)
+ {
+ QPixmap* titleBuffer = new QPixmap( width()-(2*borderSizeX), titleBarHeight );
+ QPainter p2( titleBuffer, this );
+ titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
+
+ r = titleSpacerJ->geometry();
+ if (!r.isEmpty() && titleJ[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]);
+
+ r = titleSpacerL->geometry();
+ if (!r.isEmpty() && titleL[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]);
+
+ r = titleSpacerS->geometry();
+ if (!r.isEmpty() && titleS[ act ])
+ p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]);
+
+ r = titleSpacerP->geometry();
+ if (!r.isEmpty() && titleP[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]);
+
+ r = titlebar->geometry();
+ if (!r.isEmpty() && titleT[ act ] )
+ p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]);
+
+ r = titleSpacerM->geometry();
+ if (!r.isEmpty() && titleM[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height());
+
+ r = titleSpacerB->geometry();
+ if (!r.isEmpty() && titleB[ act ])
+ p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]);
+
+ r = titleSpacerR->geometry();
+ if (!r.isEmpty() && titleR[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height());
+
+ r = titleSpacerQ->geometry();
+ if (!r.isEmpty() && titleQ[ act ])
+ p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height());
+
+ p2.setFont( options->font(true) );
+
+ // Pre-compute as much as possible
+ r = titlebar->geometry();
+ rx = r.x() - borderSizeX;
+ rw = width()-(2*borderSizeX)-r.x();
- // Draw the title elements, if we need to draw a titlebar.
- if (titleBarHeight > 0)
- {
- QPixmap* titleBuffer = new QPixmap( width()-(2*borderSizeX), titleBarHeight );
- QPainter p2( titleBuffer, this );
- titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
-
- r = titleSpacerJ->geometry();
- if (!r.isEmpty() && titleJ[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]);
-
- r = titleSpacerL->geometry();
- if (!r.isEmpty() && titleL[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]);
-
- r = titleSpacerS->geometry();
- if (!r.isEmpty() && titleS[ act ])
- p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]);
-
- r = titleSpacerP->geometry();
- if (!r.isEmpty() && titleP[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]);
-
- r = titlebar->geometry();
- if (!r.isEmpty() && titleT[ act ] )
- p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]);
-
- r = titleSpacerM->geometry();
- if (!r.isEmpty() && titleM[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height());
-
- r = titleSpacerB->geometry();
- if (!r.isEmpty() && titleB[ act ])
- p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]);
-
- r = titleSpacerR->geometry();
- if (!r.isEmpty() && titleR[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height());
-
- r = titleSpacerQ->geometry();
- if (!r.isEmpty() && titleQ[ act ])
- p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height());
-
- p2.setFont( options->font(true) );
-
- // Pre-compute as much as possible
- r = titlebar->geometry();
- rx = r.x() - borderSizeX;
- rw = width()-(2*borderSizeX)-r.x();
+ // Paint a title text shadow if requested
+ if ( useShadow )
+ {
+ p2.setPen( colorTitleShadow );
+ p2.drawText(rx+1, 1, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
+ }
+
+ // Draw the title text
+ p2.setPen( colorTitle );
+ p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
+ p2.end();
- // Paint a title text shadow if requested
- if ( useShadow )
- {
- p2.setPen( colorTitleShadow );
- p2.drawText(rx+1, 1, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
- }
-
- // Draw the title text
- p2.setPen( colorTitle );
- p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
- p2.end();
+ bitBlt (this, borderSizeX, hb->geometry().y(), titleBuffer);
- bitBlt( this, borderSizeX, hb->geometry().y(), titleBuffer );
-
- delete titleBuffer;
- }
+ delete titleBuffer;
+ }
}
@@ -1182,6 +1203,7 @@ void IceWMClient::showEvent(QShowEvent *
titlebar->changeSize( titleTextWidth(caption()), titleBarHeight,
QSizePolicy::Preferred, QSizePolicy::Fixed );
grid->activate();
+ doShape ();
show();
Client::showEvent(ev);
}
@@ -1351,19 +1373,53 @@ Client::MousePosition IceWMClient::mouse
return m;
}
+void IceWMClient::drawRoundFrame(QPainter &p, int x, int y, int w, int h)
+{
+ kDrawRoundButton (&p, x, y, w, h, options->colorGroup(Options::TitleBlend, isActive()), false);
+}
+
+
+void IceWMClient::doShape()
+{
+ // using a bunch of QRect lines seems much more efficent than bitmaps or
+ // point arrays
+ if (bROUND_CORNERS)
+ {
+ QRegion mask;
+ kRoundMaskRegion(mask, 0, 0, width(), height());
+ setMask(mask);
+ }
+}
+
// Make sure the menu button follows double click conventions set in kcontrol
void IceWMClient::menuButtonPressed()
{
- QPoint menuPoint ( button[BtnSysMenu]->rect().bottomLeft() );
+ static QTime* t = 0;
+ static IceWMClient* tc = 0;
+ if ( !t )
+ t = new QTime;
+
+ if ( tc != this || t->elapsed() > QApplication::doubleClickInterval() )
+ {
+ QPoint menuPoint ( button[BtnSysMenu]->rect().bottomLeft() );
+
+ // Move to right if menu on rhs, otherwise on left
+ // and make this depend on windowWrapper(), not button.
+ workspace()->clientPopup(this)->popup( button[BtnSysMenu]->mapToGlobal( menuPoint ));
+
+ // Animate the menu button when pressed
+ if (button[BtnSysMenu])
+ button[BtnSysMenu]->animateClick();
+ }
+ else
+ closeWindow();
- // Move to right if menu on rhs, otherwise on left
- // and make this depend on windowWrapper(), not button.
- workspace()->showWindowMenu( button[BtnSysMenu]->mapToGlobal(menuPoint), this );
- button[BtnSysMenu]->setDown(false);
+ t->start();
+ tc = this;
}
-};
+};
extern "C"
{
@@ -1374,7 +1430,7 @@ extern "C"
void init()
{
- IceWM::clientHandler = new IceWM::ThemeHandler;
+ IceWM::clientHandler = new IceWM::ThemeHandler;
}
void reset()
Index: icewm.h
===================================================================
RCS file: /home/kde/kdeartwork/kwin-styles/icewm/icewm.h,v
retrieving revision 1.10
diff -u -3 -p -r1.10 icewm.h
--- icewm.h 22 Jan 2003 18:55:51 -0000 1.10
+++ icewm.h 7 Feb 2003 13:32:56 -0000
@@ -49,7 +49,7 @@
#include <kwin/kwinbutton.h>
class QLabel;
class QSpacerItem;
-class QBoxLayout;
+class QHBoxLayout;
class QGridLayout;
namespace IceWM {
@@ -94,7 +94,7 @@ class ThemeHandler: public QObject
};
-class IceWMButton : public KWinButton
+class IceWMButton : public KWinInternal::KWinButton
{
public:
IceWMButton( Client *parent=0, const char *name=0,
@@ -118,7 +118,7 @@ class IceWMButton : public KWinButton
};
-class IceWMClient : public Client
+class IceWMClient : public KWinInternal::Client
{
Q_OBJECT
public:
@@ -133,11 +133,14 @@ class IceWMClient : public Client
void captionChange( const QString& name );
void maximizeChange(bool m);
void activeChange(bool);
- // void shadeChange(bool); /* KWin Client class doesn't provide this yet */
- MousePosition mousePosition( const QPoint& ) const;
- void renderMenuIcons();
- void iconChange();
- void stickyChange(bool on);
+
+ void doShape();
+ void drawRoundFrame(QPainter &p, int x, int y, int w, int h);
+
+ Client::MousePosition mousePosition( const QPoint& p ) const;
+ void renderMenuIcons();
+ void iconChange();
+ void stickyChange(bool on);
protected slots:
void slotMaximize();
@@ -166,7 +169,7 @@ class IceWMClient : public Client
QSpacerItem* titleSpacerB;
QSpacerItem* titleSpacerR;
QSpacerItem* titleSpacerQ;
- QBoxLayout* hb;
+ QHBoxLayout* hb;
QGridLayout* grid;
};
_______________________________________________
Kwin mailing list
Kwin@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwin
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic