mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
added switching colors for different uploads
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1431 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
9f9773caba
commit
dacdc90c4b
1 changed files with 13 additions and 1 deletions
|
@ -24,6 +24,7 @@
|
|||
#include <QStyleOptionProgressBarV2>
|
||||
#include <QProgressBar>
|
||||
#include <QApplication>
|
||||
#include <QtGui>
|
||||
|
||||
#include "ULListDelegate.h"
|
||||
|
||||
|
@ -125,7 +126,18 @@ void ULListDelegate::paint(QPainter * painter, const QStyleOptionViewItem & opti
|
|||
{
|
||||
progress = index.data().toDouble();
|
||||
// create a xProgressBar
|
||||
xProgressBar progressBar(option.rect, painter, 8); // the 3rd param is the color schema (0 is the default value)
|
||||
xProgressBar progressBar(option.rect, painter );// the 3rd param is the color schema (0 is the default value)
|
||||
|
||||
QString ext = QFileInfo(QString::fromStdString(index.sibling(index.row(), UNAME).data().toString().toStdString())).suffix();;
|
||||
if (ext == "rsfc" || ext == "dist" )
|
||||
{
|
||||
progressBar.setColorSchema( 9);
|
||||
}
|
||||
else
|
||||
{
|
||||
progressBar.setColorSchema( 8);
|
||||
}
|
||||
|
||||
progressBar.setDisplayText(false); // should display % text?
|
||||
progressBar.setValue(progress); // set the progress value
|
||||
progressBar.setVerticalSpan(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue