Browse Source

Merge pull request #13445 from jagannatharjun/pieces-green

Use toned green color for downloading pieces in Pieces bar
adaptive-webui-19844
Mike Tzou 4 years ago committed by GitHub
parent
commit
79b4fb70f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      src/gui/properties/downloadedpiecesbar.cpp
  2. 2
      src/gui/properties/downloadedpiecesbar.h

11
src/gui/properties/downloadedpiecesbar.cpp

@ -32,9 +32,18 @@ @@ -32,9 +32,18 @@
#include <QDebug>
namespace
{
QColor dlPieceColor(const QColor &pieceColor)
{
const QColor green {Qt::green};
return QColor::fromHsl(green.hslHue(), pieceColor.hslSaturation(), pieceColor.lightness());
}
}
DownloadedPiecesBar::DownloadedPiecesBar(QWidget *parent)
: base {parent}
, m_dlPieceColor {0, 0xd0, 0}
, m_dlPieceColor {dlPieceColor(pieceColor())}
{
}

2
src/gui/properties/downloadedpiecesbar.h

@ -57,7 +57,7 @@ private: @@ -57,7 +57,7 @@ private:
QString simpleToolTipText() const override;
// incomplete piece color
QColor m_dlPieceColor;
const QColor m_dlPieceColor;
// last used bitfields, uses to better resize redraw
// TODO: make a diff pieces to new pieces and update only changed pixels, speedup when update > 20x faster
QBitArray m_pieces;

Loading…
Cancel
Save