mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-08 08:32:31 -06:00
Refresh pieces bar colors once color scheme is changed
PR #21183. Closes #21155.
This commit is contained in:
committed by
Vladimir Golovnev (Glassez)
parent
a8cffbb205
commit
a67bd271c6
@@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2024 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2016 Eugene Shalygin
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
@@ -54,17 +55,15 @@ public:
|
||||
|
||||
virtual void clear();
|
||||
|
||||
// QObject interface
|
||||
bool event(QEvent *e) override;
|
||||
|
||||
protected:
|
||||
// QWidget interface
|
||||
bool event(QEvent *e) override;
|
||||
void enterEvent(QEnterEvent *e) override;
|
||||
void leaveEvent(QEvent *e) override;
|
||||
void mouseMoveEvent(QMouseEvent *e) override;
|
||||
|
||||
void paintEvent(QPaintEvent *e) override;
|
||||
void requestImageUpdate();
|
||||
|
||||
virtual void updateColors();
|
||||
void redraw();
|
||||
|
||||
QColor backgroundColor() const;
|
||||
QColor borderColor() const;
|
||||
@@ -82,11 +81,9 @@ private:
|
||||
void highlightFile(int imagePos);
|
||||
|
||||
virtual QString simpleToolTipText() const = 0;
|
||||
virtual QImage renderImage() = 0;
|
||||
|
||||
// draw new image to replace the actual image
|
||||
// returns true if image was successfully updated
|
||||
virtual bool updateImage(QImage &image) = 0;
|
||||
void updatePieceColors();
|
||||
void updateColorsImpl();
|
||||
|
||||
const BitTorrent::Torrent *m_torrent = nullptr;
|
||||
QImage m_image;
|
||||
|
||||
Reference in New Issue
Block a user