mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-10-20 07:35:03 -04:00
Fix Color Wheel background
This commit is contained in:
1 parent
27fb7984f8
commit
11b3f55b94
2 files changed
+8
No files matched your search
+5
@@ -343,6 +343,8 @@ void ColorWheel::drawWheelImage(const QSize &newSize)
|
||||
QRegion subRe( r/2, r/2, r-tmp, r-tmp, QRegion::Ellipse );
|
||||
subRe.translate( x_offset - (r-tmp)/2, y_offset - (r-tmp)/2);
|
||||
wheelRegion -= subRe;
|
||||
|
||||
CleanWheel = QPixmap().fromImage(wheelImage);
|
||||
}
|
||||
|
||||
void ColorWheel::drawSquareImage(const int &hue)
|
||||
@@ -399,6 +401,7 @@ void ColorWheel::drawSquareImage(const int &hue)
|
||||
| Calculate square region |
|
||||
\*-----------------------------------------------------*/
|
||||
squareRegion = QRegion(x_offset + m, y_offset + m, SquareWidth, SquareWidth);
|
||||
CleanSquare = squareImage;
|
||||
}
|
||||
|
||||
void ColorWheel::drawIndicator(const int &hue)
|
||||
@@ -461,6 +464,8 @@ void ColorWheel::drawPicker(const QColor &color)
|
||||
|
||||
void ColorWheel::composeWheel()
|
||||
{
|
||||
wheel = CleanWheel;
|
||||
squareImage = CleanSquare;
|
||||
QPainter composePainter(&wheel);
|
||||
composePainter.drawImage(0, 0, wheelImage);
|
||||
composePainter.drawImage(squareRegion.boundingRect().topLeft(), squareImage);
|
||||
|
||||
Vendored
+3
@@ -42,6 +42,9 @@ private:
|
||||
int x_offset;
|
||||
int y_offset;
|
||||
|
||||
QPixmap CleanWheel;
|
||||
QImage CleanSquare;
|
||||
|
||||
QColor posColor(const QPoint &point);
|
||||
void drawWheelImage(const QSize &newSize);
|
||||
void drawIndicator(const int &hue);
|
||||
|
||||
Reference in new issue
Block a user