refactor: Revert home button color inversion logic
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#include "ViewCube.h"
|
||||
#include <QGuiApplication>
|
||||
#include <QImage>
|
||||
#include <QPainter>
|
||||
#include <QFont>
|
||||
#include <QOpenGLShaderProgram>
|
||||
@@ -237,16 +236,7 @@ void ViewCube::paint2D(QPainter& painter, int widgetWidth, int widgetHeight)
|
||||
m_homeButtonRect = getHomeButtonRect(widgetWidth);
|
||||
|
||||
if (m_homeButtonRenderer && m_homeButtonRenderer->isValid()) {
|
||||
QImage image(m_homeButtonRect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
image.fill(Qt::transparent);
|
||||
|
||||
QPainter imagePainter(&image);
|
||||
m_homeButtonRenderer->render(&imagePainter);
|
||||
imagePainter.end();
|
||||
|
||||
image.invertPixels(QImage::InvertRgb);
|
||||
|
||||
painter.drawImage(m_homeButtonRect, image);
|
||||
m_homeButtonRenderer->render(&painter, m_homeButtonRect);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user