|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
(c) 2002,2003 Maksim Orlovich <mo002j@mail.rochester.edu>
|
|
|
|
|
based on the KDE3 HighColor Style
|
|
|
|
|
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
|
|
|
|
|
(C) 2001-2002 Fredrik Höglund <fredrik@kde.org>
|
|
|
|
|
(C) 2001-2002 Fredrik H<EFBFBD>glund <fredrik@kde.org>
|
|
|
|
|
Drawing routines adapted from the KDE2 HCStyle,
|
|
|
|
|
Copyright (C) 2000 Daniel M. Duley <mosfet@kde.org>
|
|
|
|
|
(C) 2000 Dirk Mueller <mueller@kde.org>
|
|
|
|
@ -2071,15 +2071,15 @@ void DominoStyle::renderGradient(TQPainter *painter,
|
|
|
|
|
int rDiff, gDiff, bDiff;
|
|
|
|
|
int rc, gc, bc;
|
|
|
|
|
|
|
|
|
|
register int x, y;
|
|
|
|
|
int x, y;
|
|
|
|
|
|
|
|
|
|
rDiff = ( c2.red()) - (rc = c1.red());
|
|
|
|
|
gDiff = ( c2.green()) - (gc = c1.green());
|
|
|
|
|
bDiff = ( c2.blue()) - (bc = c1.blue());
|
|
|
|
|
|
|
|
|
|
register int rl = rc << 16;
|
|
|
|
|
register int gl = gc << 16;
|
|
|
|
|
register int bl = bc << 16;
|
|
|
|
|
int rl = rc << 16;
|
|
|
|
|
int gl = gc << 16;
|
|
|
|
|
int bl = bc << 16;
|
|
|
|
|
|
|
|
|
|
int rdelta = ((1<<16) / (horizontal ? r_h : r_w)) * rDiff;
|
|
|
|
|
int gdelta = ((1<<16) / (horizontal ? r_h : r_w)) * gDiff;
|
|
|
|
@ -7613,14 +7613,14 @@ void DominoStyle::drawFocusIndicator(TQPainter *p, const TQRect &r, int flags, c
|
|
|
|
|
|
|
|
|
|
XImage* xi = XGetImage( tqt_xdisplay(), pixm->handle(), 0, 0, width, height, AllPlanes, ZPixmap );
|
|
|
|
|
|
|
|
|
|
register int alpha;
|
|
|
|
|
register float AXIS_FACTOR = 2.0;
|
|
|
|
|
register float DIAGONAL_FACTOR = 1.0;
|
|
|
|
|
register double alphaShadow;
|
|
|
|
|
register int customalpha = isButton ? focusIndicatorSettings.buttonOpacity : focusIndicatorSettings.opacity;
|
|
|
|
|
int alpha;
|
|
|
|
|
float AXIS_FACTOR = 2.0;
|
|
|
|
|
float DIAGONAL_FACTOR = 1.0;
|
|
|
|
|
double alphaShadow;
|
|
|
|
|
int customalpha = isButton ? focusIndicatorSettings.buttonOpacity : focusIndicatorSettings.opacity;
|
|
|
|
|
|
|
|
|
|
for(register uint x = 1; x < width-1; ++x) {
|
|
|
|
|
for(register uint y = 1; y < height-1; ++y) {
|
|
|
|
|
for(uint x = 1; x < width-1; ++x) {
|
|
|
|
|
for(uint y = 1; y < height-1; ++y) {
|
|
|
|
|
|
|
|
|
|
alphaShadow = (tqBlue(XGetPixel(xi,x-1,y-1)) * DIAGONAL_FACTOR +
|
|
|
|
|
tqBlue(XGetPixel(xi,x-1,y )) * AXIS_FACTOR +
|
|
|
|
@ -7668,9 +7668,9 @@ TQPixmap DominoStyle::renderOutlineIcon(const TQPixmap* icon) const
|
|
|
|
|
TQImage outlineIcon(img.width()+2, img.height()+2, 32);
|
|
|
|
|
outlineIcon.setAlphaBuffer(true);
|
|
|
|
|
|
|
|
|
|
register unsigned int *outlineIconData = (unsigned int*) outlineIcon.bits();
|
|
|
|
|
register uint total = outlineIcon.width()*outlineIcon.height();
|
|
|
|
|
for (register uint current = 0 ; current < total ; ++current ) {
|
|
|
|
|
unsigned int *outlineIconData = (unsigned int*) outlineIcon.bits();
|
|
|
|
|
uint total = outlineIcon.width()*outlineIcon.height();
|
|
|
|
|
for (uint current = 0 ; current < total ; ++current ) {
|
|
|
|
|
outlineIconData[ current ] = 0x00000000;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7683,8 +7683,8 @@ TQPixmap DominoStyle::renderOutlineIcon(const TQPixmap* icon) const
|
|
|
|
|
bitBlt(&outlineIcon, 1, 2, &img);
|
|
|
|
|
bitBlt(&outlineIcon, 2, 2, &img);
|
|
|
|
|
|
|
|
|
|
register uint customalpha = focusIndicatorSettings.buttonOpacity;
|
|
|
|
|
for (register uint current = 0 ; current < total ; ++current ) {
|
|
|
|
|
uint customalpha = focusIndicatorSettings.buttonOpacity;
|
|
|
|
|
for (uint current = 0 ; current < total ; ++current ) {
|
|
|
|
|
outlineIconData[ current ] = tqRgba( focusIndicatorSettings.buttonColor.red(), focusIndicatorSettings.buttonColor.green(), focusIndicatorSettings.buttonColor.blue(), tqAlpha(outlineIconData[ current ]) * customalpha >> 8);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -7777,10 +7777,10 @@ void DominoStyle::dominoDrawItem( TQPainter *p, const TQRect &r,
|
|
|
|
|
axi->data = (char *) malloc((unsigned) axi->bytes_per_line * height);
|
|
|
|
|
XImage* xi = XGetImage( tqt_xdisplay(), pixm->handle(), 0, 0, width, height, AllPlanes, ZPixmap );
|
|
|
|
|
|
|
|
|
|
register int alpha;
|
|
|
|
|
register int customalpha = buttonTextEffect ? textEffectSettings.buttonOpacity : textEffectSettings.opacity;
|
|
|
|
|
for(register uint y = 0; y < height; ++y) {
|
|
|
|
|
for(register uint x = 0; x < width; ++x) {
|
|
|
|
|
int alpha;
|
|
|
|
|
int customalpha = buttonTextEffect ? textEffectSettings.buttonOpacity : textEffectSettings.opacity;
|
|
|
|
|
for(uint y = 0; y < height; ++y) {
|
|
|
|
|
for(uint x = 0; x < width; ++x) {
|
|
|
|
|
alpha = (XGetPixel(xi, x, y)& 0xff ) * customalpha >> 8; // blue as alpha
|
|
|
|
|
XPutPixel(axi, x, y, alpha);
|
|
|
|
|
}
|
|
|
|
@ -7888,9 +7888,9 @@ void DominoStyle::updateTabWidgetFrame() {
|
|
|
|
|
TQPixmap DominoStyle::disableIcon(const TQPixmap* icon) const {
|
|
|
|
|
|
|
|
|
|
TQImage img = icon->convertToImage();
|
|
|
|
|
register uint pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors();
|
|
|
|
|
register uint *data = img.depth() > 8 ? (unsigned int *)img.bits() : (unsigned int *)img.colorTable();
|
|
|
|
|
register uint val, i;
|
|
|
|
|
uint pixels = img.depth() > 8 ? img.width()*img.height() : img.numColors();
|
|
|
|
|
uint *data = img.depth() > 8 ? (unsigned int *)img.bits() : (unsigned int *)img.colorTable();
|
|
|
|
|
uint val, i;
|
|
|
|
|
for(i=0; i < pixels; ++i){
|
|
|
|
|
val = tqGray(data[i]);
|
|
|
|
|
data[i] = tqRgba(val, val, val, tqAlpha(data[i]));
|
|
|
|
|