|
|
|
@ -818,40 +818,40 @@ void CrystalClient::updateMask()
|
|
|
|
|
int cornersFlag = ::factory->roundCorners;
|
|
|
|
|
int r(width());
|
|
|
|
|
int b(height());
|
|
|
|
|
TQRegion tqmask;
|
|
|
|
|
TQRegion mask;
|
|
|
|
|
|
|
|
|
|
tqmask=TQRegion(widget()->rect());
|
|
|
|
|
mask=TQRegion(widget()->rect());
|
|
|
|
|
|
|
|
|
|
// Remove top-left corner.
|
|
|
|
|
if(cornersFlag & TOP_LEFT) {
|
|
|
|
|
tqmask -= TQRegion(0, 0, 5, 1);
|
|
|
|
|
tqmask -= TQRegion(0, 1, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(0, 2, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(0, 3, 1, 2);
|
|
|
|
|
mask -= TQRegion(0, 0, 5, 1);
|
|
|
|
|
mask -= TQRegion(0, 1, 3, 1);
|
|
|
|
|
mask -= TQRegion(0, 2, 2, 1);
|
|
|
|
|
mask -= TQRegion(0, 3, 1, 2);
|
|
|
|
|
}
|
|
|
|
|
// Remove top-right corner.
|
|
|
|
|
if(cornersFlag & TOP_RIGHT) {
|
|
|
|
|
tqmask -= TQRegion(r - 5, 0, 5, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 3, 1, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 2, 2, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 1, 3, 1, 2);
|
|
|
|
|
mask -= TQRegion(r - 5, 0, 5, 1);
|
|
|
|
|
mask -= TQRegion(r - 3, 1, 3, 1);
|
|
|
|
|
mask -= TQRegion(r - 2, 2, 2, 1);
|
|
|
|
|
mask -= TQRegion(r - 1, 3, 1, 2);
|
|
|
|
|
}
|
|
|
|
|
// Remove bottom-left corner.
|
|
|
|
|
if(cornersFlag & BOT_LEFT) {
|
|
|
|
|
tqmask -= TQRegion(0, b - 5, 1, 3);
|
|
|
|
|
tqmask -= TQRegion(0, b - 3, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(0, b - 2, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(0, b - 1, 5, 1);
|
|
|
|
|
mask -= TQRegion(0, b - 5, 1, 3);
|
|
|
|
|
mask -= TQRegion(0, b - 3, 2, 1);
|
|
|
|
|
mask -= TQRegion(0, b - 2, 3, 1);
|
|
|
|
|
mask -= TQRegion(0, b - 1, 5, 1);
|
|
|
|
|
}
|
|
|
|
|
// Remove bottom-right corner.
|
|
|
|
|
if(cornersFlag & BOT_RIGHT) {
|
|
|
|
|
tqmask -= TQRegion(r - 5, b - 1, 5, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 3, b - 2, 3, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 2, b - 3, 2, 1);
|
|
|
|
|
tqmask -= TQRegion(r - 1, b - 5, 1, 2);
|
|
|
|
|
mask -= TQRegion(r - 5, b - 1, 5, 1);
|
|
|
|
|
mask -= TQRegion(r - 3, b - 2, 3, 1);
|
|
|
|
|
mask -= TQRegion(r - 2, b - 3, 2, 1);
|
|
|
|
|
mask -= TQRegion(r - 1, b - 5, 1, 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
setMask(tqmask);
|
|
|
|
|
setMask(mask);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CrystalButton* CrystalClient::addButtons(TQBoxLayout *tqlayout, const TQString& s)
|
|
|
|
@ -1147,19 +1147,19 @@ bool CrystalClient::eventFilter(TQObject *obj, TQEvent *e)
|
|
|
|
|
|
|
|
|
|
void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_client)
|
|
|
|
|
{
|
|
|
|
|
Window root=0,frame=0,wrapper=0,client=0,tqparent=0,*tqchildren=NULL;
|
|
|
|
|
Window root=0,frame=0,wrapper=0,client=0,parent=0,*tqchildren=NULL;
|
|
|
|
|
uint numc;
|
|
|
|
|
if (v_frame) *v_frame=0;
|
|
|
|
|
if (v_wrapper) *v_wrapper=0;
|
|
|
|
|
if (v_client) *v_client=0;
|
|
|
|
|
// Our Deco is the child of a frame, get our tqparent
|
|
|
|
|
// Our Deco is the child of a frame, get our parent
|
|
|
|
|
if (XQueryTree(qt_xdisplay(),widget()->winId(),&root,&frame,&tqchildren,&numc) == 0)
|
|
|
|
|
return;
|
|
|
|
|
if (tqchildren!=NULL)XFree(tqchildren);
|
|
|
|
|
tqchildren=NULL;
|
|
|
|
|
|
|
|
|
|
// frame has two tqchildren, us and a wrapper, get the wrapper
|
|
|
|
|
if (XQueryTree(qt_xdisplay(),frame,&root,&tqparent,&tqchildren,&numc)==0)
|
|
|
|
|
if (XQueryTree(qt_xdisplay(),frame,&root,&parent,&tqchildren,&numc)==0)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
for (uint i=0;i<numc;i++)
|
|
|
|
@ -1170,7 +1170,7 @@ void CrystalClient::ClientWindows(Window* v_frame,Window* v_wrapper,Window *v_cl
|
|
|
|
|
tqchildren=NULL;
|
|
|
|
|
|
|
|
|
|
// wrapper has only one child, which is the client. We want this!!
|
|
|
|
|
if (XQueryTree(qt_xdisplay(),wrapper,&root,&tqparent,&tqchildren,&numc)==0)
|
|
|
|
|
if (XQueryTree(qt_xdisplay(),wrapper,&root,&parent,&tqchildren,&numc)==0)
|
|
|
|
|
return;
|
|
|
|
|
if (numc==1)client=tqchildren[0];
|
|
|
|
|
if (tqchildren!=NULL)XFree(tqchildren);
|
|
|
|
@ -1409,7 +1409,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
|
|
|
|
|
int r=(width());
|
|
|
|
|
int b=(height());
|
|
|
|
|
|
|
|
|
|
// Draw edge of top-left corner inside the area removed by the tqmask.
|
|
|
|
|
// Draw edge of top-left corner inside the area removed by the mask.
|
|
|
|
|
if(cornersFlag & TOP_LEFT) {
|
|
|
|
|
painter.setPen(c1);
|
|
|
|
|
painter.drawPoint(3, 1);
|
|
|
|
@ -1419,7 +1419,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
|
|
|
|
|
painter.drawPoint(1, 4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Draw edge of top-right corner inside the area removed by the tqmask.
|
|
|
|
|
// Draw edge of top-right corner inside the area removed by the mask.
|
|
|
|
|
if(cornersFlag & TOP_RIGHT) {
|
|
|
|
|
painter.setPen(c1);
|
|
|
|
|
painter.drawPoint(r - 5, 1);
|
|
|
|
@ -1429,7 +1429,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
|
|
|
|
|
painter.drawPoint(r - 2, 4);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Draw edge of bottom-left corner inside the area removed by the tqmask.
|
|
|
|
|
// Draw edge of bottom-left corner inside the area removed by the mask.
|
|
|
|
|
if(cornersFlag & BOT_LEFT) {
|
|
|
|
|
painter.setPen(c2);
|
|
|
|
|
painter.drawPoint(1, b - 5);
|
|
|
|
@ -1439,7 +1439,7 @@ void CrystalClient::paintEvent(TQPaintEvent*)
|
|
|
|
|
painter.drawPoint(4, b - 2);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Draw edge of bottom-right corner inside the area removed by the tqmask.
|
|
|
|
|
// Draw edge of bottom-right corner inside the area removed by the mask.
|
|
|
|
|
if(cornersFlag & BOT_RIGHT) {
|
|
|
|
|
painter.setPen(c2);
|
|
|
|
|
painter.drawPoint(r - 2, b - 5);
|
|
|
|
|