|
|
|
@ -2771,10 +2771,10 @@ void KlearlookStyle::drawControl(
|
|
|
|
|
TQPixmap pixmap = *mi->pixmap();
|
|
|
|
|
|
|
|
|
|
if ( 1 == pixmap.depth() )
|
|
|
|
|
p->setBackgroundMode( Qt::OpaqueMode );
|
|
|
|
|
p->setBackgroundMode( TQt::OpaqueMode );
|
|
|
|
|
p->drawPixmap( ir.x(), ( ir.height() - pixmap.height() ) >> 1, pixmap );
|
|
|
|
|
if ( pixmap.depth() == 1 )
|
|
|
|
|
p->setBackgroundMode( Qt::TransparentMode );
|
|
|
|
|
p->setBackgroundMode( TQt::TransparentMode );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( mi->popup() )
|
|
|
|
@ -3307,7 +3307,7 @@ void KlearlookStyle::drawComplexControl(
|
|
|
|
|
( hw && HOVER_SB_SUB == hover ? Style_MouseOver : Style_Default ) |
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarSubLine ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default )
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default )
|
|
|
|
|
);
|
|
|
|
|
if ( ( controls & SC_ScrollBarAddLine ) && addline.isValid() )
|
|
|
|
|
drawPrimitive(
|
|
|
|
@ -3315,34 +3315,34 @@ void KlearlookStyle::drawComplexControl(
|
|
|
|
|
( hw && HOVER_SB_ADD == hover ? Style_MouseOver : Style_Default ) |
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarAddLine ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default )
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default )
|
|
|
|
|
);
|
|
|
|
|
if ( ( controls & SC_ScrollBarSubPage ) && subpage.isValid() )
|
|
|
|
|
drawPrimitive( PE_ScrollBarSubPage, p, ceData, elementFlags, subpage, cg,
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarSubPage ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
if ( ( controls & SC_ScrollBarAddPage ) && addpage.isValid() )
|
|
|
|
|
drawPrimitive( PE_ScrollBarAddPage, p, ceData, elementFlags, addpage, cg,
|
|
|
|
|
( ( scrollbar->minValue() == scrollbar->maxValue() ) ? Style_Default : Style_Enabled ) |
|
|
|
|
|
( ( active == SC_ScrollBarAddPage ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
if ( ( controls & SC_ScrollBarFirst ) && first.isValid() )
|
|
|
|
|
drawPrimitive( PE_ScrollBarFirst, p, ceData, elementFlags, first, cg,
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarFirst ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
if ( ( controls & SC_ScrollBarLast ) && last.isValid() )
|
|
|
|
|
drawPrimitive( PE_ScrollBarLast, p, ceData, elementFlags, last, cg,
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarLast ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
if ( ( controls & SC_ScrollBarSlider ) && slider.isValid() ) {
|
|
|
|
|
drawPrimitive( PE_ScrollBarSlider, p, ceData, elementFlags, slider, cg,
|
|
|
|
|
( hw && HOVER_SB_SLIDER == hover ? Style_MouseOver : Style_Default ) |
|
|
|
|
|
Style_Enabled |
|
|
|
|
|
( ( active == SC_ScrollBarSlider ) ? Style_Down : Style_Default ) |
|
|
|
|
|
( ( scrollbar->orientation() == Qt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
( ( scrollbar->orientation() == TQt::Horizontal ) ? Style_Horizontal : Style_Default ) );
|
|
|
|
|
|
|
|
|
|
// ### perhaps this should not be able to accept focus if maxedOut?
|
|
|
|
|
if ( scrollbar->hasFocus() )
|
|
|
|
@ -3855,7 +3855,7 @@ void KlearlookStyle::drawSliderGroove
|
|
|
|
|
drawPrimitive( PE_FocusRect, p, ceData, elementFlags, fr, TQColorGroup() );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ( Qt::Horizontal == slider->orientation() ) {
|
|
|
|
|
if ( TQt::Horizontal == slider->orientation() ) {
|
|
|
|
|
int dh = ( groove.height() - 5 ) >> 1;
|
|
|
|
|
|
|
|
|
|
groove.addCoords( 0, dh, 0, -dh );
|
|
|
|
|