@ -14,83 +14,83 @@
# include "malloryhandler.h"
# include <kdecoration.h>
# include < qpainter.h>
# include < t qpainter.h>
# include <kpixmapeffect.h>
# include <kpixmap.h>
# include <kpixmapio.h>
# include < qimage.h>
# include < qpixmap.h>
# include < t qimage.h>
# include < t qpixmap.h>
// Static declarations for linking.
QPixmap * Pixmaps : : active_button_ground = 0 ;
QPixmap * Pixmaps : : inactive_button_ground = 0 ;
QImage * Pixmaps : : active_help_normal = 0 ;
QImage * Pixmaps : : active_max_normal = 0 ;
QImage * Pixmaps : : active_restore_normal = 0 ;
QImage * Pixmaps : : active_min_normal = 0 ;
QImage * Pixmaps : : active_close_normal = 0 ;
QImage * Pixmaps : : active_sticky_normal = 0 ;
QImage * Pixmaps : : active_unsticky_normal = 0 ;
QImage * Pixmaps : : active_above_normal = 0 ;
QImage * Pixmaps : : active_below_normal = 0 ;
QImage * Pixmaps : : active_help_hover = 0 ;
QImage * Pixmaps : : active_max_hover = 0 ;
QImage * Pixmaps : : active_restore_hover = 0 ;
QImage * Pixmaps : : active_min_hover = 0 ;
QImage * Pixmaps : : active_close_hover = 0 ;
QImage * Pixmaps : : active_sticky_hover = 0 ;
QImage * Pixmaps : : active_unsticky_hover = 0 ;
QImage * Pixmaps : : active_above_hover = 0 ;
QImage * Pixmaps : : active_below_hover = 0 ;
QImage * Pixmaps : : active_help_sunken = 0 ;
QImage * Pixmaps : : active_max_sunken = 0 ;
QImage * Pixmaps : : active_restore_sunken = 0 ;
QImage * Pixmaps : : active_min_sunken = 0 ;
QImage * Pixmaps : : active_close_sunken = 0 ;
QImage * Pixmaps : : active_sticky_sunken = 0 ;
QImage * Pixmaps : : active_unsticky_sunken = 0 ;
QImage * Pixmaps : : active_above_sunken = 0 ;
QImage * Pixmaps : : active_below_sunken = 0 ;
QImage * Pixmaps : : inactive_help_normal = 0 ;
QImage * Pixmaps : : inactive_max_normal = 0 ;
QImage * Pixmaps : : inactive_restore_normal = 0 ;
QImage * Pixmaps : : inactive_min_normal = 0 ;
QImage * Pixmaps : : inactive_close_normal = 0 ;
QImage * Pixmaps : : inactive_sticky_normal = 0 ;
QImage * Pixmaps : : inactive_unsticky_normal = 0 ;
QImage * Pixmaps : : inactive_above_normal = 0 ;
QImage * Pixmaps : : inactive_below_normal = 0 ;
QImage * Pixmaps : : inactive_help_hover = 0 ;
QImage * Pixmaps : : inactive_max_hover = 0 ;
QImage * Pixmaps : : inactive_restore_hover = 0 ;
QImage * Pixmaps : : inactive_min_hover = 0 ;
QImage * Pixmaps : : inactive_close_hover = 0 ;
QImage * Pixmaps : : inactive_sticky_hover = 0 ;
QImage * Pixmaps : : inactive_unsticky_hover = 0 ;
QImage * Pixmaps : : inactive_above_hover = 0 ;
QImage * Pixmaps : : inactive_below_hover = 0 ;
QImage * Pixmaps : : inactive_help_sunken = 0 ;
QImage * Pixmaps : : inactive_max_sunken = 0 ;
QImage * Pixmaps : : inactive_restore_sunken = 0 ;
QImage * Pixmaps : : inactive_min_sunken = 0 ;
QImage * Pixmaps : : inactive_close_sunken = 0 ;
QImage * Pixmaps : : inactive_sticky_sunken = 0 ;
QImage * Pixmaps : : inactive_unsticky_sunken = 0 ;
QImage * Pixmaps : : inactive_above_sunken = 0 ;
QImage * Pixmaps : : inactive_below_sunken = 0 ;
QPixmap * Pixmaps : : active_titlebar = 0 ;
QPixmap * Pixmaps : : active_titlebar_left = 0 ;
QPixmap * Pixmaps : : active_titlebar_right = 0 ;
QPixmap * Pixmaps : : inactive_titlebar = 0 ;
QPixmap * Pixmaps : : inactive_titlebar_left = 0 ;
QPixmap * Pixmaps : : inactive_titlebar_right = 0 ;
T QPixmap * Pixmaps : : active_button_ground = 0 ;
T QPixmap * Pixmaps : : inactive_button_ground = 0 ;
T QImage * Pixmaps : : active_help_normal = 0 ;
T QImage * Pixmaps : : active_max_normal = 0 ;
T QImage * Pixmaps : : active_restore_normal = 0 ;
T QImage * Pixmaps : : active_min_normal = 0 ;
T QImage * Pixmaps : : active_close_normal = 0 ;
T QImage * Pixmaps : : active_sticky_normal = 0 ;
T QImage * Pixmaps : : active_unsticky_normal = 0 ;
T QImage * Pixmaps : : active_above_normal = 0 ;
T QImage * Pixmaps : : active_below_normal = 0 ;
T QImage * Pixmaps : : active_help_hover = 0 ;
T QImage * Pixmaps : : active_max_hover = 0 ;
T QImage * Pixmaps : : active_restore_hover = 0 ;
T QImage * Pixmaps : : active_min_hover = 0 ;
T QImage * Pixmaps : : active_close_hover = 0 ;
T QImage * Pixmaps : : active_sticky_hover = 0 ;
T QImage * Pixmaps : : active_unsticky_hover = 0 ;
T QImage * Pixmaps : : active_above_hover = 0 ;
T QImage * Pixmaps : : active_below_hover = 0 ;
T QImage * Pixmaps : : active_help_sunken = 0 ;
T QImage * Pixmaps : : active_max_sunken = 0 ;
T QImage * Pixmaps : : active_restore_sunken = 0 ;
T QImage * Pixmaps : : active_min_sunken = 0 ;
T QImage * Pixmaps : : active_close_sunken = 0 ;
T QImage * Pixmaps : : active_sticky_sunken = 0 ;
T QImage * Pixmaps : : active_unsticky_sunken = 0 ;
T QImage * Pixmaps : : active_above_sunken = 0 ;
T QImage * Pixmaps : : active_below_sunken = 0 ;
T QImage * Pixmaps : : inactive_help_normal = 0 ;
T QImage * Pixmaps : : inactive_max_normal = 0 ;
T QImage * Pixmaps : : inactive_restore_normal = 0 ;
T QImage * Pixmaps : : inactive_min_normal = 0 ;
T QImage * Pixmaps : : inactive_close_normal = 0 ;
T QImage * Pixmaps : : inactive_sticky_normal = 0 ;
T QImage * Pixmaps : : inactive_unsticky_normal = 0 ;
T QImage * Pixmaps : : inactive_above_normal = 0 ;
T QImage * Pixmaps : : inactive_below_normal = 0 ;
T QImage * Pixmaps : : inactive_help_hover = 0 ;
T QImage * Pixmaps : : inactive_max_hover = 0 ;
T QImage * Pixmaps : : inactive_restore_hover = 0 ;
T QImage * Pixmaps : : inactive_min_hover = 0 ;
T QImage * Pixmaps : : inactive_close_hover = 0 ;
T QImage * Pixmaps : : inactive_sticky_hover = 0 ;
T QImage * Pixmaps : : inactive_unsticky_hover = 0 ;
T QImage * Pixmaps : : inactive_above_hover = 0 ;
T QImage * Pixmaps : : inactive_below_hover = 0 ;
T QImage * Pixmaps : : inactive_help_sunken = 0 ;
T QImage * Pixmaps : : inactive_max_sunken = 0 ;
T QImage * Pixmaps : : inactive_restore_sunken = 0 ;
T QImage * Pixmaps : : inactive_min_sunken = 0 ;
T QImage * Pixmaps : : inactive_close_sunken = 0 ;
T QImage * Pixmaps : : inactive_sticky_sunken = 0 ;
T QImage * Pixmaps : : inactive_unsticky_sunken = 0 ;
T QImage * Pixmaps : : inactive_above_sunken = 0 ;
T QImage * Pixmaps : : inactive_below_sunken = 0 ;
T QPixmap * Pixmaps : : active_titlebar = 0 ;
T QPixmap * Pixmaps : : active_titlebar_left = 0 ;
T QPixmap * Pixmaps : : active_titlebar_right = 0 ;
T QPixmap * Pixmaps : : inactive_titlebar = 0 ;
T QPixmap * Pixmaps : : inactive_titlebar_left = 0 ;
T QPixmap * Pixmaps : : inactive_titlebar_right = 0 ;
bool Pixmaps : : pixmapsCreated = false ;
@ -406,21 +406,21 @@ void Pixmaps::createPixmaps()
alias_below = round_below ;
}
QColor aColor = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBar , true ) ;
QColor aColorBlend = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBlend , true ) ;
QColor iColor = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBar , false ) ;
QColor iColorBlend = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBlend , false ) ;
T QColor aColor = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBar , true ) ;
T QColor aColorBlend = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBlend , true ) ;
T QColor iColor = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBar , false ) ;
T QColor iColorBlend = KDecoration : : options ( ) - > color ( KDecoration : : ColorTitleBlend , false ) ;
QColor aBrite = KDecoration : : options ( ) - > color ( KDecoration : : ColorFont , true ) ;
QColor aShade = KDecoration : : options ( ) - > color ( KDecoration : : ColorButtonBg , true ) ;
QColor iBrite = KDecoration : : options ( ) - > color ( KDecoration : : ColorFont , false ) ;
QColor iShade = KDecoration : : options ( ) - > color ( KDecoration : : ColorButtonBg , false ) ;
T QColor aBrite = KDecoration : : options ( ) - > color ( KDecoration : : ColorFont , true ) ;
T QColor aShade = KDecoration : : options ( ) - > color ( KDecoration : : ColorButtonBg , true ) ;
T QColor iBrite = KDecoration : : options ( ) - > color ( KDecoration : : ColorFont , false ) ;
T QColor iShade = KDecoration : : options ( ) - > color ( KDecoration : : ColorButtonBg , false ) ;
QColor aHandle = KDecoration : : options ( ) - > color ( KDecoration : : ColorHandle , true ) ;
QColor iHandle = KDecoration : : options ( ) - > color ( KDecoration : : ColorHandle , false ) ;
T QColor aHandle = KDecoration : : options ( ) - > color ( KDecoration : : ColorHandle , true ) ;
T QColor iHandle = KDecoration : : options ( ) - > color ( KDecoration : : ColorHandle , false ) ;
QColor aFrame = KDecoration : : options ( ) - > color ( KDecoration : : ColorFrame , true ) ;
QColor iFrame = KDecoration : : options ( ) - > color ( KDecoration : : ColorFrame , false ) ;
T QColor aFrame = KDecoration : : options ( ) - > color ( KDecoration : : ColorFrame , true ) ;
T QColor iFrame = KDecoration : : options ( ) - > color ( KDecoration : : ColorFrame , false ) ;
int buttonSize = MalloryHandler : : buttonSize ( ) ;
int titleSize = MalloryHandler : : titleSize ( ) ;
@ -429,46 +429,46 @@ void Pixmaps::createPixmaps()
if ( ! MalloryHandler : : titleShadow ( ) ) // If shadow is disabled,
titleShadow = 0 ; // do something special!
QPainter painter ;
T QPainter painter ;
KPixmap tempPixmap ;
// Let's begin with the title bar.
active_titlebar = new QPixmap( 1 , titleSize ) ;
active_titlebar = new T QPixmap( 1 , titleSize ) ;
painter . begin ( active_titlebar ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , aColor , aColorBlend , KPixmapEffect : : VerticalGradient ) ;
painter . drawPixmap ( 0 , 0 , tempPixmap ) ;
painter . end ( ) ;
inactive_titlebar = new QPixmap( 1 , titleSize ) ;
inactive_titlebar = new T QPixmap( 1 , titleSize ) ;
painter . begin ( inactive_titlebar ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , iColor , iColorBlend , KPixmapEffect : : VerticalGradient ) ;
painter . drawPixmap ( 0 , 0 , tempPixmap ) ;
painter . end ( ) ;
active_titlebar_left = new QPixmap( 1 , titleSize ) ;
active_titlebar_left = new T QPixmap( 1 , titleSize ) ;
painter . begin ( active_titlebar_left ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , aColor , aColorBlend , KPixmapEffect : : VerticalGradient ) ;
painter . drawPixmap ( 0 , 0 , tempPixmap ) ;
painter . end ( ) ;
inactive_titlebar_left = new QPixmap( 1 , titleSize ) ;
inactive_titlebar_left = new T QPixmap( 1 , titleSize ) ;
painter . begin ( inactive_titlebar_left ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , iColor , iColorBlend , KPixmapEffect : : VerticalGradient ) ;
painter . drawPixmap ( 0 , 0 , tempPixmap ) ;
painter . end ( ) ;
active_titlebar_right = new QPixmap( 1 , titleSize ) ;
active_titlebar_right = new T QPixmap( 1 , titleSize ) ;
painter . begin ( active_titlebar_right ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , aColor , aColorBlend , KPixmapEffect : : VerticalGradient ) ;
painter . drawPixmap ( 0 , 0 , tempPixmap ) ;
painter . end ( ) ;
inactive_titlebar_right = new QPixmap( 1 , titleSize ) ;
inactive_titlebar_right = new T QPixmap( 1 , titleSize ) ;
painter . begin ( inactive_titlebar_right ) ;
tempPixmap . resize ( 1 , titleSize ) ;
KPixmapEffect : : gradient ( tempPixmap , iColor , iColorBlend , KPixmapEffect : : VerticalGradient ) ;
@ -476,21 +476,21 @@ void Pixmaps::createPixmaps()
painter . end ( ) ;
// Let's create the button background.
active_button_ground = new QPixmap( buttonSize , buttonSize ) ;
active_button_ground = new T QPixmap( buttonSize , buttonSize ) ;
painter . begin ( active_button_ground ) ;
drawGround ( & painter , true ) ;
painter . end ( ) ;
inactive_button_ground = new QPixmap( buttonSize , buttonSize ) ;
inactive_button_ground = new T QPixmap( buttonSize , buttonSize ) ;
painter . begin ( inactive_button_ground ) ;
drawGround ( & painter , false ) ;
painter . end ( ) ;
// Now, let's create the button icons!
int off = ( buttonSize - 16 ) / 2 ;
QPainter ikon ;
QImage * aGround = new QImage( ) ;
QImage * iGround = new QImage( ) ;
QPixmap * tempGround = new QPixmap( 16 , 16 ) ;
T QPainter ikon ;
T QImage * aGround = new T QImage( ) ;
T QImage * iGround = new T QImage( ) ;
T QPixmap * tempGround = new T QPixmap( 16 , 16 ) ;
ikon . begin ( tempGround ) ;
ikon . drawPixmap ( 0 , 0 , * active_button_ground , off , off , 16 , 16 ) ;
* aGround = tempGround - > convertToImage ( ) ;
@ -507,228 +507,228 @@ void Pixmaps::createPixmaps()
iShade . getRgb ( & isr , & isg , & isb ) ;
// Lotsa work to do.
// Zero...
active_help_normal = new QImage( 16 , 16 , 32 ) ;
active_help_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_help_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_help , * active_help_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_help , * active_help_normal , abr , abg , abb , 1 ) ;
active_help_hover = new QImage( 16 , 16 , 32 ) ;
active_help_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_help_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_help , * active_help_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_help , * active_help_hover , abr , abg , abb , 0 ) ;
active_help_sunken = new QImage( 16 , 16 , 32 ) ;
active_help_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_help_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_help , * active_help_sunken , abr , abg , abb , 2 ) ;
inactive_help_normal = new QImage( 16 , 16 , 32 ) ;
inactive_help_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_help_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_help , * inactive_help_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_help , * inactive_help_normal , ibr , ibg , ibb , 1 ) ;
inactive_help_hover = new QImage( 16 , 16 , 32 ) ;
inactive_help_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_help_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_help , * inactive_help_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_help , * inactive_help_hover , ibr , ibg , ibb , 0 ) ;
inactive_help_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_help_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_help_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_help , * inactive_help_sunken , ibr , ibg , ibb , 2 ) ;
// Six...
active_max_normal = new QImage( 16 , 16 , 32 ) ;
active_max_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_max_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_max , * active_max_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_max , * active_max_normal , abr , abg , abb , 1 ) ;
active_max_hover = new QImage( 16 , 16 , 32 ) ;
active_max_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_max_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_max , * active_max_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_max , * active_max_hover , abr , abg , abb , 0 ) ;
active_max_sunken = new QImage( 16 , 16 , 32 ) ;
active_max_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_max_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_max , * active_max_sunken , abr , abg , abb , 2 ) ;
inactive_max_normal = new QImage( 16 , 16 , 32 ) ;
inactive_max_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_max_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_max , * inactive_max_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_max , * inactive_max_normal , ibr , ibg , ibb , 1 ) ;
inactive_max_hover = new QImage( 16 , 16 , 32 ) ;
inactive_max_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_max_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_max , * inactive_max_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_max , * inactive_max_hover , ibr , ibg , ibb , 0 ) ;
inactive_max_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_max_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_max_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_max , * inactive_max_sunken , ibr , ibg , ibb , 2 ) ;
// Twelve...
active_restore_normal = new QImage( 16 , 16 , 32 ) ;
active_restore_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_restore_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_restore , * active_restore_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_restore , * active_restore_normal , abr , abg , abb , 1 ) ;
active_restore_hover = new QImage( 16 , 16 , 32 ) ;
active_restore_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_restore_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_restore , * active_restore_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_restore , * active_restore_hover , abr , abg , abb , 0 ) ;
active_restore_sunken = new QImage( 16 , 16 , 32 ) ;
active_restore_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_restore_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_restore , * active_restore_sunken , abr , abg , abb , 2 ) ;
inactive_restore_normal = new QImage( 16 , 16 , 32 ) ;
inactive_restore_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_restore_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_restore , * inactive_restore_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_restore , * inactive_restore_normal , ibr , ibg , ibb , 1 ) ;
inactive_restore_hover = new QImage( 16 , 16 , 32 ) ;
inactive_restore_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_restore_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_restore , * inactive_restore_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_restore , * inactive_restore_hover , ibr , ibg , ibb , 0 ) ;
inactive_restore_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_restore_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_restore_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_restore , * inactive_restore_sunken , ibr , ibg , ibb , 2 ) ;
// Eighteen
active_min_normal = new QImage( 16 , 16 , 32 ) ;
active_min_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_min_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_min , * active_min_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_min , * active_min_normal , abr , abg , abb , 1 ) ;
active_min_hover = new QImage( 16 , 16 , 32 ) ;
active_min_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_min_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_min , * active_min_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_min , * active_min_hover , abr , abg , abb , 0 ) ;
active_min_sunken = new QImage( 16 , 16 , 32 ) ;
active_min_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_min_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_min , * active_min_sunken , abr , abg , abb , 2 ) ;
inactive_min_normal = new QImage( 16 , 16 , 32 ) ;
inactive_min_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_min_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_min , * inactive_min_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_min , * inactive_min_normal , ibr , ibg , ibb , 1 ) ;
inactive_min_hover = new QImage( 16 , 16 , 32 ) ;
inactive_min_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_min_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_min , * inactive_min_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_min , * inactive_min_hover , ibr , ibg , ibb , 0 ) ;
inactive_min_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_min_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_min_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_min , * inactive_min_sunken , ibr , ibg , ibb , 2 ) ;
// Twenty four...
active_close_normal = new QImage( 16 , 16 , 32 ) ;
active_close_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_close_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_close , * active_close_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_close , * active_close_normal , abr , abg , abb , 1 ) ;
active_close_hover = new QImage( 16 , 16 , 32 ) ;
active_close_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_close_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_close , * active_close_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_close , * active_close_hover , abr , abg , abb , 0 ) ;
active_close_sunken = new QImage( 16 , 16 , 32 ) ;
active_close_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_close_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_close , * active_close_sunken , abr , abg , abb , 2 ) ;
inactive_close_normal = new QImage( 16 , 16 , 32 ) ;
inactive_close_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_close_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_close , * inactive_close_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_close , * inactive_close_normal , ibr , ibg , ibb , 1 ) ;
inactive_close_hover = new QImage( 16 , 16 , 32 ) ;
inactive_close_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_close_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_close , * inactive_close_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_close , * inactive_close_hover , ibr , ibg , ibb , 0 ) ;
inactive_close_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_close_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_close_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_close , * inactive_close_sunken , ibr , ibg , ibb , 2 ) ;
// Thirty...
active_sticky_normal = new QImage( 16 , 16 , 32 ) ;
active_sticky_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_sticky_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_sticky , * active_sticky_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_sticky , * active_sticky_normal , abr , abg , abb , 1 ) ;
active_sticky_hover = new QImage( 16 , 16 , 32 ) ;
active_sticky_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_sticky_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_sticky , * active_sticky_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_sticky , * active_sticky_hover , abr , abg , abb , 0 ) ;
active_sticky_sunken = new QImage( 16 , 16 , 32 ) ;
active_sticky_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_sticky_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_sticky , * active_sticky_sunken , abr , abg , abb , 2 ) ;
inactive_sticky_normal = new QImage( 16 , 16 , 32 ) ;
inactive_sticky_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_sticky_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_sticky , * inactive_sticky_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_sticky , * inactive_sticky_normal , ibr , ibg , ibb , 1 ) ;
inactive_sticky_hover = new QImage( 16 , 16 , 32 ) ;
inactive_sticky_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_sticky_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_sticky , * inactive_sticky_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_sticky , * inactive_sticky_hover , ibr , ibg , ibb , 0 ) ;
inactive_sticky_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_sticky_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_sticky_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_sticky , * inactive_sticky_sunken , ibr , ibg , ibb , 2 ) ;
// Thirty six...
active_unsticky_normal = new QImage( 16 , 16 , 32 ) ;
active_unsticky_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_unsticky_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_unsticky , * active_unsticky_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_unsticky , * active_unsticky_normal , abr , abg , abb , 1 ) ;
active_unsticky_hover = new QImage( 16 , 16 , 32 ) ;
active_unsticky_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_unsticky_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_unsticky , * active_unsticky_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_unsticky , * active_unsticky_hover , abr , abg , abb , 0 ) ;
active_unsticky_sunken = new QImage( 16 , 16 , 32 ) ;
active_unsticky_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_unsticky_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_unsticky , * active_unsticky_sunken , abr , abg , abb , 2 ) ;
inactive_unsticky_normal = new QImage( 16 , 16 , 32 ) ;
inactive_unsticky_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_unsticky_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_unsticky , * inactive_unsticky_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_unsticky , * inactive_unsticky_normal , ibr , ibg , ibb , 1 ) ;
inactive_unsticky_hover = new QImage( 16 , 16 , 32 ) ;
inactive_unsticky_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_unsticky_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_unsticky , * inactive_unsticky_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_unsticky , * inactive_unsticky_hover , ibr , ibg , ibb , 0 ) ;
inactive_unsticky_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_unsticky_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_unsticky_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_unsticky , * inactive_unsticky_sunken , ibr , ibg , ibb , 2 ) ;
// Forty two...
active_above_normal = new QImage( 16 , 16 , 32 ) ;
active_above_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_above_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_above , * active_above_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_above , * active_above_normal , abr , abg , abb , 1 ) ;
active_above_hover = new QImage( 16 , 16 , 32 ) ;
active_above_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_above_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_above , * active_above_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_above , * active_above_hover , abr , abg , abb , 0 ) ;
active_above_sunken = new QImage( 16 , 16 , 32 ) ;
active_above_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_above_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_above , * active_above_sunken , abr , abg , abb , 2 ) ;
inactive_above_normal = new QImage( 16 , 16 , 32 ) ;
inactive_above_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_above_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_above , * inactive_above_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_above , * inactive_above_normal , ibr , ibg , ibb , 1 ) ;
inactive_above_hover = new QImage( 16 , 16 , 32 ) ;
inactive_above_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_above_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_above , * inactive_above_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_above , * inactive_above_hover , ibr , ibg , ibb , 0 ) ;
inactive_above_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_above_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_above_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_above , * inactive_above_sunken , ibr , ibg , ibb , 2 ) ;
// Forty eight...
active_below_normal = new QImage( 16 , 16 , 32 ) ;
active_below_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_below_normal , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_below , * active_below_normal , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_below , * active_below_normal , abr , abg , abb , 1 ) ;
active_below_hover = new QImage( 16 , 16 , 32 ) ;
active_below_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_below_hover , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_below , * active_below_hover , asr , asg , asb , titleShadow + 1 ) ;
unicity ( alias_below , * active_below_hover , abr , abg , abb , 0 ) ;
active_below_sunken = new QImage( 16 , 16 , 32 ) ;
active_below_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( active_below_sunken , 0 , 0 , aGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_below , * active_below_sunken , abr , abg , abb , 2 ) ;
inactive_below_normal = new QImage( 16 , 16 , 32 ) ;
inactive_below_normal = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_below_normal , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
if ( titleShadow )
unicity ( alias_below , * inactive_below_normal , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_below , * inactive_below_normal , ibr , ibg , ibb , 1 ) ;
inactive_below_hover = new QImage( 16 , 16 , 32 ) ;
inactive_below_hover = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_below_hover , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_below , * inactive_below_hover , isr , isg , isb , titleShadow + 1 ) ;
unicity ( alias_below , * inactive_below_hover , ibr , ibg , ibb , 0 ) ;
inactive_below_sunken = new QImage( 16 , 16 , 32 ) ;
inactive_below_sunken = new T QImage( 16 , 16 , 32 ) ;
bitBlt ( inactive_below_sunken , 0 , 0 , iGround , 0 , 0 , 16 , 16 , 0 ) ;
unicity ( alias_below , * inactive_below_sunken , ibr , ibg , ibb , 2 ) ;
// Fifty four... Don't lose the count!
@ -873,7 +873,7 @@ void Pixmaps::deletePixmaps()
}
// Redo the buttons' background.
void Pixmaps : : drawGround ( QPainter* painter , bool active )
void Pixmaps : : drawGround ( T QPainter* painter , bool active )
{
int buttonSize = MalloryHandler : : buttonSize ( ) ;
int titleSize = MalloryHandler : : titleSize ( ) ;
@ -881,10 +881,10 @@ void Pixmaps::drawGround(QPainter* painter, bool active)
int buttonTop = ( titleSize - buttonSize ) / 2 ;
// Get the titlebar colors right behind the buttons for the gradient.
QImage * titlebar_image = new QImage( ) ;
T QImage * titlebar_image = new T QImage( ) ;
* titlebar_image = active ? active_titlebar - > convertToImage ( ) : inactive_titlebar - > convertToImage ( ) ;
QColor title_color1 = titlebar_image - > pixel ( 0 , buttonTop ) ;
QColor title_color2 = titlebar_image - > pixel ( 0 , buttonTop + buttonSize - 1 ) ;
T QColor title_color1 = titlebar_image - > pixel ( 0 , buttonTop ) ;
T QColor title_color2 = titlebar_image - > pixel ( 0 , buttonTop + buttonSize - 1 ) ;
// The temporary canvas.
KPixmap tempPixmap ;
@ -895,7 +895,7 @@ void Pixmaps::drawGround(QPainter* painter, bool active)
delete titlebar_image ;
}
void Pixmaps : : unicity ( int * alias , QImage& work , int rr , int gg , int bb , int offset )
void Pixmaps : : unicity ( int * alias , T QImage& work , int rr , int gg , int bb , int offset )
{
int x , y ;
int z = 0 ;
@ -910,13 +910,13 @@ void Pixmaps::unicity(int* alias, QImage& work, int rr, int gg, int bb, int offs
case 0xF : // Keep background.
break ;
case 0x0 : // Replace.
line [ x ] = qRgb( rr , gg , bb ) ;
line [ x ] = t qRgb( rr , gg , bb ) ;
break ;
default : // 15-level colorization
uint pxl = line [ x ] ;
line [ x ] = qRgb( ( qRed( pxl ) * alias [ z ] + rr * ( 15 - alias [ z ] ) ) / 15 ,
( qGreen( pxl ) * alias [ z ] + gg * ( 15 - alias [ z ] ) ) / 15 ,
( qBlue( pxl ) * alias [ z ] + bb * ( 15 - alias [ z ] ) ) / 15 ) ;
line [ x ] = t qRgb( ( t qRed( pxl ) * alias [ z ] + rr * ( 15 - alias [ z ] ) ) / 15 ,
( t qGreen( pxl ) * alias [ z ] + gg * ( 15 - alias [ z ] ) ) / 15 ,
( t qBlue( pxl ) * alias [ z ] + bb * ( 15 - alias [ z ] ) ) / 15 ) ;
}
z + + ;
}