Skip to content

Commit

Permalink
Fix for line/text boldness on hdpi vs normal monitors
Browse files Browse the repository at this point in the history
  • Loading branch information
alanspencer committed Nov 9, 2018
1 parent 3fd02ce commit 33b70d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions SPIERSview/src/drawglscalegrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ void DrawGLScaleGrid::drawLine(QMatrix4x4 vMatrix, QVector3D lPosition, float po
// Set Line width if major line
if (major)
{
glWidget->glfunctions->glLineWidth(4);

glWidget->glfunctions->glLineWidth(2 * ((applicationScaleX + applicationScaleY) / 2));
}

glWidget->glfunctions->glDrawArrays(GL_LINES, 0, 2);
Expand Down Expand Up @@ -412,7 +413,7 @@ void DrawGLScaleGrid::renderCharacter(GLfloat x, GLfloat y, GLfloat z, int chara
// Set line with if bold
if (bold)
{
glWidget->glfunctions->glLineWidth(3);
glWidget->glfunctions->glLineWidth(2 * ((applicationScaleX + applicationScaleY) / 2));
}

glWidget->glfunctions->glDrawArrays(GL_LINES, 0, static_cast<int>(CharacterLineCounts[fontSizeGrid][charactercode]));
Expand Down

0 comments on commit 33b70d5

Please sign in to comment.