Browse Source

Move initial values to header

adaptive-webui-19844
Chocobo1 4 years ago
parent
commit
ecebfc34fa
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C
  1. 2
      src/gui/properties/piecesbar.cpp
  2. 4
      src/gui/properties/piecesbar.h

2
src/gui/properties/piecesbar.cpp

@ -112,8 +112,6 @@ namespace @@ -112,8 +112,6 @@ namespace
PiecesBar::PiecesBar(QWidget *parent)
: QWidget {parent}
, m_torrent {nullptr}
, m_hovered {false}
{
updatePieceColors();
setMouseTracking(true);

4
src/gui/properties/piecesbar.h

@ -91,10 +91,10 @@ private: @@ -91,10 +91,10 @@ private:
virtual bool updateImage(QImage &image) = 0;
void updatePieceColors();
const BitTorrent::Torrent *m_torrent;
const BitTorrent::Torrent *m_torrent = nullptr;
QImage m_image;
// buffered 256 levels gradient from bg_color to piece_color
QVector<QRgb> m_pieceColors;
bool m_hovered;
bool m_hovered = false;
QRect m_highlitedRegion; //!< part of the bar can be highlighted; this rectangle is in the same frame as m_image
};

Loading…
Cancel
Save