Skip to content

Commit

Permalink
fix(ColorWidgets): Use QLineF to draw ramp lines
Browse files Browse the repository at this point in the history
To avoid possible hidpi issues
  • Loading branch information
troopa81 authored and nyalldawson committed Aug 20, 2024
1 parent 6cd3e14 commit 58e7a9d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/qgscolorwidgets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1173,12 +1173,12 @@ void QgsColorRampWidget::paintEvent( QPaintEvent *event )
if ( mOrientation == QgsColorRampWidget::Horizontal )
{
//horizontal
painter.drawLine( c + mMargin, mMargin, c + mMargin, height() - mMargin - 1 );
painter.drawLine( QLineF( c + mMargin, mMargin, c + mMargin, height() - mMargin - 1 ) );
}
else
{
//vertical
painter.drawLine( mMargin, c + mMargin, width() - mMargin - 1, c + mMargin );
painter.drawLine( QLineF( mMargin, c + mMargin, width() - mMargin - 1, c + mMargin ) );
}
}
}
Expand Down

0 comments on commit 58e7a9d

Please sign in to comment.