|
|
@ -802,7 +802,7 @@ void IceWMButton::usePixmap( TQPixmap* (*p)[2] )
|
|
|
|
if (validPixmaps( *p )) {
|
|
|
|
if (validPixmaps( *p )) {
|
|
|
|
pix = p;
|
|
|
|
pix = p;
|
|
|
|
setFixedSize( (*pix)[Active]->width(), titleBarHeight );
|
|
|
|
setFixedSize( (*pix)[Active]->width(), titleBarHeight );
|
|
|
|
tqrepaint( false );
|
|
|
|
repaint( false );
|
|
|
|
} else
|
|
|
|
} else
|
|
|
|
pix = NULL;
|
|
|
|
pix = NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1186,9 +1186,9 @@ void IceWMClient::resizeEvent( TQResizeEvent* e )
|
|
|
|
if ( dx )
|
|
|
|
if ( dx )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
widget()->update( width() - dx + 1, 0, dx, height() );
|
|
|
|
widget()->update( width() - dx + 1, 0, dx, height() );
|
|
|
|
widget()->update( TQRect( TQPoint(4,4), titlebar->tqgeometry().bottomLeft() - TQPoint(1,0) ) );
|
|
|
|
widget()->update( TQRect( TQPoint(4,4), titlebar->geometry().bottomLeft() - TQPoint(1,0) ) );
|
|
|
|
widget()->update( TQRect( titlebar->tqgeometry().topRight(), TQPoint( width() - 4, titlebar->tqgeometry().bottom() ) ) );
|
|
|
|
widget()->update( TQRect( titlebar->geometry().topRight(), TQPoint( width() - 4, titlebar->geometry().bottom() ) ) );
|
|
|
|
widget()->tqrepaint(titlebar->tqgeometry(), false);
|
|
|
|
widget()->repaint(titlebar->geometry(), false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1377,46 +1377,46 @@ void IceWMClient::paintEvent( TQPaintEvent* )
|
|
|
|
TQPainter p2( titleBuffer, this );
|
|
|
|
TQPainter p2( titleBuffer, this );
|
|
|
|
titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
|
|
|
|
titleBuffer->fill( act ? *colorActiveTitleBar : *colorInActiveTitleBar );
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerJ->tqgeometry();
|
|
|
|
r = titleSpacerJ->geometry();
|
|
|
|
if (!r.isEmpty() && titleJ[ act ])
|
|
|
|
if (!r.isEmpty() && titleJ[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]);
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleJ[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerL->tqgeometry();
|
|
|
|
r = titleSpacerL->geometry();
|
|
|
|
if (!r.isEmpty() && titleL[ act ])
|
|
|
|
if (!r.isEmpty() && titleL[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]);
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleL[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerS->tqgeometry();
|
|
|
|
r = titleSpacerS->geometry();
|
|
|
|
if (!r.isEmpty() && titleS[ act ])
|
|
|
|
if (!r.isEmpty() && titleS[ act ])
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]);
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleS[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerP->tqgeometry();
|
|
|
|
r = titleSpacerP->geometry();
|
|
|
|
if (!r.isEmpty() && titleP[ act ])
|
|
|
|
if (!r.isEmpty() && titleP[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]);
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleP[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titlebar->tqgeometry();
|
|
|
|
r = titlebar->geometry();
|
|
|
|
if (!r.isEmpty() && titleT[ act ] )
|
|
|
|
if (!r.isEmpty() && titleT[ act ] )
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]);
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleT[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerM->tqgeometry();
|
|
|
|
r = titleSpacerM->geometry();
|
|
|
|
if (!r.isEmpty() && titleM[ act ])
|
|
|
|
if (!r.isEmpty() && titleM[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height());
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleM[ act ], 0, 0, r.width(), r.height());
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerB->tqgeometry();
|
|
|
|
r = titleSpacerB->geometry();
|
|
|
|
if (!r.isEmpty() && titleB[ act ])
|
|
|
|
if (!r.isEmpty() && titleB[ act ])
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]);
|
|
|
|
p2.drawTiledPixmap( r.x()-borderSizeX, 0, r.width(), titleBarHeight, *titleB[ act ]);
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerR->tqgeometry();
|
|
|
|
r = titleSpacerR->geometry();
|
|
|
|
if (!r.isEmpty() && titleR[ act ])
|
|
|
|
if (!r.isEmpty() && titleR[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height());
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleR[ act ], 0, 0, r.width(), r.height());
|
|
|
|
|
|
|
|
|
|
|
|
r = titleSpacerQ->tqgeometry();
|
|
|
|
r = titleSpacerQ->geometry();
|
|
|
|
if (!r.isEmpty() && titleQ[ act ])
|
|
|
|
if (!r.isEmpty() && titleQ[ act ])
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height());
|
|
|
|
p2.drawPixmap( r.x()-borderSizeX, 0, *titleQ[ act ], 0, 0, r.width(), r.height());
|
|
|
|
|
|
|
|
|
|
|
|
p2.setFont( options()->font(true) );
|
|
|
|
p2.setFont( options()->font(true) );
|
|
|
|
|
|
|
|
|
|
|
|
// Pre-compute as much as possible
|
|
|
|
// Pre-compute as much as possible
|
|
|
|
r = titlebar->tqgeometry();
|
|
|
|
r = titlebar->geometry();
|
|
|
|
rx = r.x() - borderSizeX;
|
|
|
|
rx = r.x() - borderSizeX;
|
|
|
|
rw = width()-(2*borderSizeX)-r.x();
|
|
|
|
rw = width()-(2*borderSizeX)-r.x();
|
|
|
|
|
|
|
|
|
|
|
@ -1432,7 +1432,7 @@ void IceWMClient::paintEvent( TQPaintEvent* )
|
|
|
|
p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
|
|
|
|
p2.drawText(rx, 0, rw, titleBarHeight, AlignLeft|AlignVCenter, caption());
|
|
|
|
p2.end();
|
|
|
|
p2.end();
|
|
|
|
|
|
|
|
|
|
|
|
bitBlt( widget(), borderSizeX, hb->tqgeometry().y(), titleBuffer );
|
|
|
|
bitBlt( widget(), borderSizeX, hb->geometry().y(), titleBuffer );
|
|
|
|
|
|
|
|
|
|
|
|
delete titleBuffer;
|
|
|
|
delete titleBuffer;
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1486,7 +1486,7 @@ void IceWMClient::iconChange()
|
|
|
|
renderMenuIcons();
|
|
|
|
renderMenuIcons();
|
|
|
|
button[BtnSysMenu]->usePixmap( &menuButtonWithIconPix );
|
|
|
|
button[BtnSysMenu]->usePixmap( &menuButtonWithIconPix );
|
|
|
|
if (button[BtnSysMenu]->isVisible())
|
|
|
|
if (button[BtnSysMenu]->isVisible())
|
|
|
|
button[BtnSysMenu]->tqrepaint(false);
|
|
|
|
button[BtnSysMenu]->repaint(false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1497,7 +1497,7 @@ void IceWMClient::desktopChange()
|
|
|
|
if (button[BtnDepth])
|
|
|
|
if (button[BtnDepth])
|
|
|
|
{
|
|
|
|
{
|
|
|
|
button[BtnDepth]->turnOn( isOnAllDesktops() );
|
|
|
|
button[BtnDepth]->turnOn( isOnAllDesktops() );
|
|
|
|
button[BtnDepth]->tqrepaint(false);
|
|
|
|
button[BtnDepth]->repaint(false);
|
|
|
|
button[BtnDepth]->setTipText(isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops"));
|
|
|
|
button[BtnDepth]->setTipText(isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops"));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1512,7 +1512,7 @@ void IceWMClient::captionChange()
|
|
|
|
TQSizePolicy::Preferred, TQSizePolicy::Fixed );
|
|
|
|
TQSizePolicy::Preferred, TQSizePolicy::Fixed );
|
|
|
|
titlebar->invalidate();
|
|
|
|
titlebar->invalidate();
|
|
|
|
grid->activate();
|
|
|
|
grid->activate();
|
|
|
|
widget()->tqrepaint( r, false );
|
|
|
|
widget()->repaint( r, false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1541,12 +1541,12 @@ void IceWMClient::shadeChange()
|
|
|
|
|
|
|
|
|
|
|
|
void IceWMClient::activeChange()
|
|
|
|
void IceWMClient::activeChange()
|
|
|
|
{
|
|
|
|
{
|
|
|
|
widget()->tqrepaint(false);
|
|
|
|
widget()->repaint(false);
|
|
|
|
|
|
|
|
|
|
|
|
// Reset the button pixmaps.
|
|
|
|
// Reset the button pixmaps.
|
|
|
|
for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++)
|
|
|
|
for(int i= IceWMClient::BtnSysMenu; i < IceWMClient::BtnCount; i++)
|
|
|
|
if(button[i])
|
|
|
|
if(button[i])
|
|
|
|
button[i]->tqrepaint( false );
|
|
|
|
button[i]->repaint( false );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|