diff options
Diffstat (limited to 'kicker/applets/minipager/pagerbutton.cpp')
-rw-r--r-- | kicker/applets/minipager/pagerbutton.cpp | 76 |
1 files changed, 26 insertions, 50 deletions
diff --git a/kicker/applets/minipager/pagerbutton.cpp b/kicker/applets/minipager/pagerbutton.cpp index 6bd13ca3e..5c4bf71e8 100644 --- a/kicker/applets/minipager/pagerbutton.cpp +++ b/kicker/applets/minipager/pagerbutton.cpp @@ -400,47 +400,39 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (!liveBkgnd) + // frame + if (liveBkgnd || transparent) { - if (transparent) + if (m_pager->border3D()) { - // transparent windows get an 1 pixel frame... - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else if (down) - { - bp->setPen(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - bp->setPen(colorGroup().dark()); - } - - bp->drawRect(0, 0, w, h); + qDrawShadeRect(bp, 0, 0, w, h, on ? palette().active() : palette().inactive()); } else { - TQBrush background; - - if (on) - { - background = colorGroup().brush(TQColorGroup::Midlight); - } - else if (down) - { - background = TQBrush(KickerLib::blendColors(colorGroup().mid(), - colorGroup().midlight())); - } - else - { - background = colorGroup().brush(TQColorGroup::Mid); - } + bp->setPen(on ? colorGroup().midlight() + : KickerLib::blendColors(colorGroup().mid(), colorGroup().midlight())); + bp->drawRect(0, 0, w, h); + } + } + else + { + TQBrush background; - bp->fillRect(0, 0, w, h, background); + if (on) + { + background = colorGroup().brush(TQColorGroup::Midlight); + } + else if (down) + { + background = TQBrush(KickerLib::blendColors(colorGroup().mid(), + colorGroup().midlight())); } + else + { + background = colorGroup().brush(TQColorGroup::Mid); + } + + bp->fillRect(0, 0, w, h, background); } // window preview... @@ -495,22 +487,6 @@ void KMiniPagerButton::drawButton(TQPainter *bp) } } - if (liveBkgnd) - { - // draw a little border around the individual buttons - // makes it look a bit more finished. - if (on) - { - bp->setPen(colorGroup().midlight()); - } - else - { - bp->setPen(colorGroup().mid()); - } - - bp->drawRect(0, 0, w, h); - } - if (m_pager->labelType() != PagerSettings::EnumLabelType::LabelNone) { TQString label = (m_pager->labelType() == PagerSettings::EnumLabelType::LabelNumber) ? |