fix: Correct 2D axis label Y-position and set color to white
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -87,7 +87,7 @@ void ViewCube::paintGL(QOpenGLShaderProgram* simpleShader, int simpleShaderColor
|
|||||||
QVector3D zAxisNdc = mvp.map(zAxisEnd);
|
QVector3D zAxisNdc = mvp.map(zAxisEnd);
|
||||||
|
|
||||||
const int vpX = width - viewCubeSize;
|
const int vpX = width - viewCubeSize;
|
||||||
const int vpY = height - viewCubeSize;
|
const int vpY = 0;
|
||||||
const int vpW = viewCubeSize;
|
const int vpW = viewCubeSize;
|
||||||
const int vpH = viewCubeSize;
|
const int vpH = viewCubeSize;
|
||||||
const float dpr = QGuiApplication::primaryScreen()->devicePixelRatio();
|
const float dpr = QGuiApplication::primaryScreen()->devicePixelRatio();
|
||||||
@@ -261,7 +261,7 @@ void ViewCube::paint2D(QPainter& painter, int widgetWidth, int widgetHeight)
|
|||||||
{
|
{
|
||||||
QFont font("Arial", 10, QFont::Bold);
|
QFont font("Arial", 10, QFont::Bold);
|
||||||
painter.setFont(font);
|
painter.setFont(font);
|
||||||
painter.setPen(Qt::black);
|
painter.setPen(Qt::white);
|
||||||
QFontMetrics fm(font);
|
QFontMetrics fm(font);
|
||||||
|
|
||||||
QRect xRect = fm.boundingRect("X");
|
QRect xRect = fm.boundingRect("X");
|
||||||
|
|||||||
Reference in New Issue
Block a user