|
|
|
@ -201,7 +201,7 @@ void DeMaximizer::setClient(BaghiraClient *client)
|
|
|
|
|
// repaint();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// ResizeHandle()
|
|
|
|
|
// ---------------
|
|
|
|
@ -289,7 +289,6 @@ void ResizeHandle::paintEvent ( TQPaintEvent * )
|
|
|
|
|
p.drawPixmap(0,0,pix);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
// BaghiraFactory()
|
|
|
|
@ -1458,7 +1457,7 @@ void BaghiraClient::init()
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
noDeco_ = false;
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
|
|
|
|
|
//first try if there's an X setting
|
|
|
|
|
unsigned char *data = 0;
|
|
|
|
|
Atom actual;
|
|
|
|
@ -1510,23 +1509,7 @@ void BaghiraClient::init()
|
|
|
|
|
}
|
|
|
|
|
if (currentStyle > 4)
|
|
|
|
|
currentStyle = BaghiraFactory::defaultMode();
|
|
|
|
|
#else
|
|
|
|
|
TQSettings config;
|
|
|
|
|
config.beginGroup("/baghira/Style");
|
|
|
|
|
if (config.readBoolEntry( "Design_Default", 1 ) == 2)
|
|
|
|
|
{
|
|
|
|
|
currentStyle = 2;
|
|
|
|
|
config.endGroup();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
config.endGroup();
|
|
|
|
|
config.beginGroup("/baghira/Deco");
|
|
|
|
|
int tmp = config.readNumEntry( "defaultMode", 1 );
|
|
|
|
|
currentStyle = (tmp > -1 && tmp < 5) ? tmp : 1;
|
|
|
|
|
config.endGroup();
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
createMainWidget( WResizeNoErase | WRepaintNoErase );
|
|
|
|
|
widget() ->installEventFilter( this );
|
|
|
|
|
widget() ->setBackgroundMode( NoBackground );
|
|
|
|
@ -1567,9 +1550,7 @@ void BaghiraClient::init()
|
|
|
|
|
plusminus = -1;
|
|
|
|
|
isFaded = false;
|
|
|
|
|
addButtons( titlelayout, options() ->titleButtonsRight() );
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
grip = 0;
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed)
|
|
|
|
|
HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false ));
|
|
|
|
@ -1835,10 +1816,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
|
|
|
|
|
case TQEvent::MouseButtonPress: {
|
|
|
|
|
if (titlebar_->geometry().contains( static_cast<TQMouseEvent *>(e)->pos() ) && static_cast<TQMouseEvent *>(e)->state() == TQt::ControlButton){
|
|
|
|
|
currentStyle < 4 ? currentStyle++ : currentStyle = 0;
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
|
|
|
|
|
unsigned long wmDesign = currentStyle;
|
|
|
|
|
XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L);
|
|
|
|
|
#endif
|
|
|
|
|
widget()->repaint();
|
|
|
|
|
TQBitmap *m = NULL;
|
|
|
|
|
TQBitmap *mn = NULL;
|
|
|
|
@ -1886,10 +1866,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
|
|
|
|
|
button[i]->repaint();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
if (grip)
|
|
|
|
|
grip->updateLook(TRUE);
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
doShape();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
@ -1918,9 +1897,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
case TQEvent::Show: {
|
|
|
|
|
#if KDE_IS_VERSION(3,3,91)
|
|
|
|
|
if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this);
|
|
|
|
|
#endif
|
|
|
|
|
if (!grip && BaghiraFactory::resizeGrip() && isResizable())
|
|
|
|
|
grip = new ResizeHandle(this);
|
|
|
|
|
|
|
|
|
|
showEvent( static_cast<TQShowEvent *>( e ) );
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|