Thinner outline.

svn path=/trunk/KDE/kdebase/workspace/; revision=576666
This commit is contained in:
Luboš Luňák 2006-08-24 15:01:28 +00:00
parent 4472c82d68
commit 8032ae2117

View file

@ -557,63 +557,66 @@ void TabBox::updateOutline()
return;
}
// left/right parts are between top/bottom, they don't reach as far as the corners
XMoveResizeWindow( display(), outline_left, c->x(), c->y() + 7, 7, c->height() - 14 );
XMoveResizeWindow( display(), outline_right, c->x() + c->width() - 7, c->y() + 7, 7, c->height() - 14 );
XMoveResizeWindow( display(), outline_top, c->x(), c->y(), c->width(), 7 );
XMoveResizeWindow( display(), outline_bottom, c->x(), c->y() + c->height() - 7, c->width(), 7 );
XMoveResizeWindow( display(), outline_left, c->x(), c->y() + 5, 5, c->height() - 10 );
XMoveResizeWindow( display(), outline_right, c->x() + c->width() - 5, c->y() + 5, 5, c->height() - 10 );
XMoveResizeWindow( display(), outline_top, c->x(), c->y(), c->width(), 5 );
XMoveResizeWindow( display(), outline_bottom, c->x(), c->y() + c->height() - 5, c->width(), 5 );
{
QPixmap pix( 7, c->height() - 14 );
QPixmap pix( 5, c->height() - 10 );
QPainter p( &pix );
p.setPen( Qt::white );
p.drawLine( 0, 0, 0, pix.height() - 1 );
p.drawLine( 6, 0, 6, pix.height() - 1 );
p.drawLine( 4, 0, 4, pix.height() - 1 );
p.setPen( Qt::gray );
p.drawLine( 1, 0, 1, pix.height() - 1 );
p.drawLine( 5, 0, 5, pix.height() - 1 );
p.fillRect( QRect( QPoint( 2, 0 ), QPoint( 4, pix.height() - 1 )), Qt::black );
p.drawLine( 3, 0, 3, pix.height() - 1 );
p.setPen( Qt::black );
p.drawLine( 2, 0, 2, pix.height() - 1 );
p.end();
XSetWindowBackgroundPixmap( display(), outline_left, pix.handle());
XSetWindowBackgroundPixmap( display(), outline_right, pix.handle());
}
{
QPixmap pix( c->width(), 7 );
QPixmap pix( c->width(), 5 );
QPainter p( &pix );
p.setPen( Qt::white );
p.drawLine( 0, 0, pix.width() - 1 - 0, 0 );
p.drawLine( 6, 6, pix.width() - 1 - 6, 6 );
p.drawLine( 0, 0, 0, 6 );
p.drawLine( pix.width() - 1 - 0, 0, pix.width() - 1 - 0, 6 );
p.drawLine( 4, 4, pix.width() - 1 - 4, 4 );
p.drawLine( 0, 0, 0, 4 );
p.drawLine( pix.width() - 1 - 0, 0, pix.width() - 1 - 0, 4 );
p.setPen( Qt::gray );
p.drawLine( 1, 1, pix.width() - 1 - 1, 1 );
p.drawLine( 5, 5, pix.width() - 1 - 5, 5 );
p.drawLine( 1, 1, 1, 6 );
p.drawLine( 5, 5, 5, 6 );
p.drawLine( pix.width() - 1 - 1, 1, pix.width() - 1 - 1, 6 );
p.drawLine( pix.width() - 1 - 5, 5, pix.width() - 1 - 5, 6 );
p.fillRect( QRect( QPoint( 2, 2 ), QPoint( pix.width() - 1 - 4, 4 )), Qt::black );
p.fillRect( QRect( QPoint( 2, 2 ), QPoint( 4, 6 )), Qt::black );
p.fillRect( QRect( QPoint( pix.width() - 1 - 4, 2 ), QPoint( pix.width() - 1 - 2, 6 )), Qt::black );
p.drawLine( 3, 3, pix.width() - 1 - 3, 3 );
p.drawLine( 1, 1, 1, 4 );
p.drawLine( 3, 3, 3, 4 );
p.drawLine( pix.width() - 1 - 1, 1, pix.width() - 1 - 1, 4 );
p.drawLine( pix.width() - 1 - 3, 3, pix.width() - 1 - 3, 4 );
p.setPen( Qt::black );
p.drawLine( 2, 2, pix.width() - 1 - 2, 2 );
p.drawLine( 2, 2, 2, 4 );
p.drawLine( pix.width() - 1 - 2, 2, pix.width() - 1 - 2, 4 );
p.end();
XSetWindowBackgroundPixmap( display(), outline_top, pix.handle());
}
{
QPixmap pix( c->width(), 7 );
QPixmap pix( c->width(), 5 );
QPainter p( &pix );
p.setPen( Qt::white );
p.drawLine( 6, 0, pix.width() - 1 - 6, 0 );
p.drawLine( 0, 6, pix.width() - 1 - 0, 6 );
p.drawLine( 0, 6, 0, 0 );
p.drawLine( pix.width() - 1 - 0, 6, pix.width() - 1 - 0, 0 );
p.drawLine( 4, 0, pix.width() - 1 - 4, 0 );
p.drawLine( 0, 4, pix.width() - 1 - 0, 4 );
p.drawLine( 0, 4, 0, 0 );
p.drawLine( pix.width() - 1 - 0, 4, pix.width() - 1 - 0, 0 );
p.setPen( Qt::gray );
p.drawLine( 5, 1, pix.width() - 1 - 5, 1 );
p.drawLine( 1, 5, pix.width() - 1 - 1, 5 );
p.drawLine( 5, 1, 5, 0 );
p.drawLine( 1, 5, 1, 0 );
p.drawLine( pix.width() - 1 - 5, 1, pix.width() - 1 - 5, 0 );
p.drawLine( pix.width() - 1 - 1, 5, pix.width() - 1 - 1, 0 );
p.fillRect( QRect( QPoint( 2, 2 ), QPoint( pix.width() - 1 - 4, 4 )), Qt::black );
p.fillRect( QRect( QPoint( 2, 0 ), QPoint( 4, 4 )), Qt::black );
p.fillRect( QRect( QPoint( pix.width() - 1 - 4, 0 ), QPoint( pix.width() - 1 - 2, 4 )), Qt::black );
p.drawLine( 3, 1, pix.width() - 1 - 3, 1 );
p.drawLine( 1, 3, pix.width() - 1 - 1, 3 );
p.drawLine( 3, 1, 3, 0 );
p.drawLine( 1, 3, 1, 0 );
p.drawLine( pix.width() - 1 - 3, 1, pix.width() - 1 - 3, 0 );
p.drawLine( pix.width() - 1 - 1, 3, pix.width() - 1 - 1, 0 );
p.setPen( Qt::black );
p.drawLine( 2, 2, pix.width() - 1 - 2, 2 );
p.drawLine( 2, 0, 2, 2 );
p.drawLine( pix.width() - 1 - 2, 0, pix.width() - 1 - 2 , 2 );
p.end();
XSetWindowBackgroundPixmap( display(), outline_bottom, pix.handle());
}