mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-20 13:23:34 -07:00
Use toned green color for downloading pieces in Pieces bar
This commit is contained in:
parent
1c87073990
commit
fbe484a615
2 changed files with 11 additions and 2 deletions
|
@ -32,9 +32,18 @@
|
||||||
|
|
||||||
#include <QDebug>
|
#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)
|
DownloadedPiecesBar::DownloadedPiecesBar(QWidget *parent)
|
||||||
: base {parent}
|
: base {parent}
|
||||||
, m_dlPieceColor {0, 0xd0, 0}
|
, m_dlPieceColor {dlPieceColor(pieceColor())}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ private:
|
||||||
QString simpleToolTipText() const override;
|
QString simpleToolTipText() const override;
|
||||||
|
|
||||||
// incomplete piece color
|
// incomplete piece color
|
||||||
QColor m_dlPieceColor;
|
const QColor m_dlPieceColor;
|
||||||
// last used bitfields, uses to better resize redraw
|
// 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
|
// TODO: make a diff pieces to new pieces and update only changed pixels, speedup when update > 20x faster
|
||||||
QBitArray m_pieces;
|
QBitArray m_pieces;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue