From bdf50483df0ef3206360314f9107ff06d268b027 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Tue, 18 Sep 2007 19:08:09 +0000 Subject: [PATCH] - Attempt to make progress bar text color dynamic --- src/DLListDelegate.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/DLListDelegate.h b/src/DLListDelegate.h index 52ecb9c94..7125f15ab 100644 --- a/src/DLListDelegate.h +++ b/src/DLListDelegate.h @@ -86,7 +86,8 @@ class DLListDelegate: public QItemDelegate { newopt.textVisible = false; QApplication::style()->drawControl(QStyle::CE_ProgressBar, &newopt, painter); - painter->setPen(QColor("Black")); + QPalette::ColorGroup cg = opt.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; + painter->setPen(opt.palette.color(cg, QPalette::WindowText)); painter->drawText(opt.rect, Qt::AlignCenter, newopt.text); break; }