187
188
d->menuAltKeyNavigation = settings.readBoolEntry("/KStyle/Settings/MenuAltKeyNavigation", true);
188
189
d->scrollablePopupmenus = settings.readBoolEntry("/KStyle/Settings/ScrollablePopupMenus", false);
189
190
d->menuDropShadow = settings.readBoolEntry("/KStyle/Settings/MenuDropShadow", false);
191
d->semiTransparentRubberband = settings.readBoolEntry("/KStyle/Settings/SemiTransparentRubberband", false);
190
192
d->menuHandler = NULL;
192
194
if (useMenuTransparency) {
554
556
// General handle, probably a kicker applet handle.
555
557
drawKStylePrimitive( KPE_GeneralHandle, p, widget, r, cg, flags, opt );
558
#if QT_VERSION >= 0x030300
560
} else if ( d->semiTransparentRubberband && pe == QStyle::PE_RubberBand ) {
561
QRect rect = r.normalize();
563
point = p->xForm( point );
565
static XRenderColor clr = { 0, 0, 0, 0 };
566
static unsigned long fillColor = 0;
567
if ( fillColor != cg.highlight().rgb() ) {
568
fillColor = cg.highlight().rgb();
570
unsigned long color = fillColor << 8 | 0x40;
572
int red = (color >> 24) & 0xff;
573
int green = (color >> 16) & 0xff;
574
int blue = (color >> 8) & 0xff;
575
int alpha = (color >> 0) & 0xff;
577
red = red * alpha / 255;
578
green = green * alpha / 255;
579
blue = blue * alpha / 255;
581
clr.red = (red << 8) + red;
582
clr.green = (green << 8) + green;
583
clr.blue = (blue << 8) + blue;
584
clr.alpha = (alpha << 8) + alpha;
587
XRenderFillRectangle(
588
p->device()->x11Display(),
590
p->device()->x11RenderHandle(),
592
rect.x() + point.x(),
593
rect.y() + point.y(),
598
p->setRasterOp( Qt::CopyROP );
599
p->setPen( QPen( cg.highlight().dark( 160 ), 1 ) );
600
p->setBrush( NoBrush );
602
rect.x() + point.x(),
603
rect.y() + point.y(),
558
610
QCommonStyle::drawPrimitive( pe, p, r, cg, flags, opt );