- COSMETIC: Use more skin colors instead of hard coded ones

This commit is contained in:
Christophe Dumez
2007-11-24 23:50:27 +00:00
parent 4ba2c3d385
commit 48aac758c9
4 changed files with 4 additions and 3 deletions

1
TODO
View File

@@ -53,3 +53,4 @@
rc9->rc10 changelog:
- FEATURE: Greatly improved ETA calculation algorithm (use GASA)
- COSMETIC: Use more skin colors instead of hard coded ones

View File

@@ -414,7 +414,7 @@ void DownloadingTorrents::updateDlList() {
}else{
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/stalled.png"))), Qt::DecorationRole);
DLListModel->setData(DLListModel->index(row, ETA), QVariant((qlonglong)-1));
setRowColor(row, QPalette::WindowText);
setRowColor(row, QApplication::palette().color(QPalette::WindowText));
}
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
DLListModel->setData(DLListModel->index(row, DLSPEED), QVariant((double)h.download_payload_rate()));

View File

@@ -82,7 +82,7 @@ class DownloadingTorrents : public QWidget, public Ui::downloading{
public slots:
void updateDlList();
void setInfoBar(QString info, QColor color=QPalette::WindowText);
void setInfoBar(QString info, QColor color=QApplication::palette().color(QPalette::WindowText));
void pauseTorrent(QString hash);
void resumeTorrent(QString hash);
void updateRatio();

View File

@@ -42,7 +42,7 @@ class QGnomeLookStyle : public QCleanlooksStyle {
vertical = (pb2->orientation == Qt::Vertical);
}
if (!vertical) {
QPalette::ColorRole textRole = QPalette::Dark;/*
QPalette::ColorRole textRole = QPalette::WindowText;/*
if ((pb->textAlignment & Qt::AlignCenter) && pb->textVisible
&& ((qint64(pb->progress) - qint64(pb->minimum)) * 2 >= (qint64(pb->maximum) - qint64(pb->minimum)))) {
textRole = QPalette::HighlightedText;