Allow smaller grid dots on Retina displays.

This commit is contained in:
Jeff Young 2024-01-19 20:35:56 +00:00
parent 0e6f1a9f99
commit 7fbeea0195
3 changed files with 5 additions and 6 deletions

View File

@ -111,19 +111,19 @@ bool GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
if( m_options.m_gridStyle != m_gridStyle )
{
m_gridStyle = m_options.m_gridStyle ;
m_gridStyle = m_options.m_gridStyle;
refresh = true;
}
if( m_options.m_gridLineWidth != m_gridLineWidth )
{
m_gridLineWidth = std::floor( m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.5 ) );
m_gridLineWidth = m_options.m_scaleFactor * m_options.m_gridLineWidth + 0.25;
refresh = true;
}
if( m_options.m_gridMinSpacing != m_gridMinSpacing )
{
m_gridMinSpacing = m_options.m_scaleFactor * m_options.m_gridMinSpacing;
m_gridMinSpacing = m_options.m_gridMinSpacing;
refresh = true;
}

View File

@ -509,8 +509,7 @@ bool OPENGL_GAL::updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions )
if( m_options.m_scaleFactor != GetScaleFactor() )
{
SetScaleFactor( m_options.m_scaleFactor );
m_gridLineWidth = m_options.m_scaleFactor * std::floor( m_options.m_gridLineWidth + 0.5 );
m_gridMinSpacing = m_options.m_scaleFactor * m_options.m_gridMinSpacing;
m_gridLineWidth = m_options.m_scaleFactor * ( m_options.m_gridLineWidth + 0.25 );
refresh = true;
}

View File

@ -30,7 +30,7 @@
/*
* Spin control parameters
*/
static const double gridThicknessMin = 1.0;
static const double gridThicknessMin = 0.5;
static const double gridThicknessMax = 10.0;
static const double gridThicknessStep = 0.5;