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 "ViewCube.h"
|
||||||
#include <QGuiApplication>
|
#include <QGuiApplication>
|
||||||
#include <QImage>
|
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QOpenGLShaderProgram>
|
#include <QOpenGLShaderProgram>
|
||||||
@@ -237,16 +236,7 @@ void ViewCube::paint2D(QPainter& painter, int widgetWidth, int widgetHeight)
|
|||||||
m_homeButtonRect = getHomeButtonRect(widgetWidth);
|
m_homeButtonRect = getHomeButtonRect(widgetWidth);
|
||||||
|
|
||||||
if (m_homeButtonRenderer && m_homeButtonRenderer->isValid()) {
|
if (m_homeButtonRenderer && m_homeButtonRenderer->isValid()) {
|
||||||
QImage image(m_homeButtonRect.size(), QImage::Format_ARGB32_Premultiplied);
|
m_homeButtonRenderer->render(&painter, m_homeButtonRect);
|
||||||
image.fill(Qt::transparent);
|
|
||||||
|
|
||||||
QPainter imagePainter(&image);
|
|
||||||
m_homeButtonRenderer->render(&imagePainter);
|
|
||||||
imagePainter.end();
|
|
||||||
|
|
||||||
image.invertPixels(QImage::InvertRgb);
|
|
||||||
|
|
||||||
painter.drawImage(m_homeButtonRect, image);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user