diff options
Diffstat (limited to 'tdefx')
-rw-r--r-- | tdefx/kstyle.cpp | 18 | ||||
-rw-r--r-- | tdefx/kstyle.h | 4 |
2 files changed, 10 insertions, 12 deletions
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp index bf5c5a22a..b56705146 100644 --- a/tdefx/kstyle.cpp +++ b/tdefx/kstyle.cpp @@ -881,11 +881,10 @@ void KStyle::drawControl( TQ_ControlElement element, case CE_ProgressBarContents: { // ### Take into account totalSteps() for busy indicator - const TQProgressBar* pb = (const TQProgressBar*)widget; TQRect cr = subRect(SR_ProgressBarContents, ceData, elementFlags, widget); - double progress = pb->progress(); + double progress = ceData.currentStep; bool reverse = TQApplication::reverseLayout(); - int steps = pb->totalSteps(); + int steps = ceData.totalSteps; if (!cr.isValid()) return; @@ -945,11 +944,10 @@ void KStyle::drawControl( TQ_ControlElement element, } case CE_ProgressBarLabel: { - const TQProgressBar* pb = (const TQProgressBar*)widget; TQRect cr = subRect(SR_ProgressBarContents, ceData, elementFlags, widget); - double progress = pb->progress(); + double progress = ceData.currentStep; bool reverse = TQApplication::reverseLayout(); - int steps = pb->totalSteps(); + int steps = ceData.totalSteps; if (!cr.isValid()) return; @@ -969,16 +967,16 @@ void KStyle::drawControl( TQ_ControlElement element, crect.setRect(cr.x()+width, cr.y(), cr.width(), cr.height()); p->save(); - p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text()); - p->drawText(r, AlignCenter, pb->progressString()); + p->setPen((elementFlags & CEF_IsEnabled) ? (reverse ? cg.text() : cg.highlightedText()) : cg.text()); + p->drawText(r, AlignCenter, ceData.progressText); p->setClipRect(crect); p->setPen(reverse ? cg.highlightedText() : cg.text()); - p->drawText(r, AlignCenter, pb->progressString()); + p->drawText(r, AlignCenter, ceData.progressText); p->restore(); } else { p->setPen(cg.text()); - p->drawText(r, AlignCenter, pb->progressString()); + p->drawText(r, AlignCenter, ceData.progressText); } break; diff --git a/tdefx/kstyle.h b/tdefx/kstyle.h index 7b5de8c81..f73fc2dd8 100644 --- a/tdefx/kstyle.h +++ b/tdefx/kstyle.h @@ -237,8 +237,8 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle KPE_ListViewBranch }; - // Old API - // DEPRECATED + // Old API + // DEPRECATED virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, |