Skip to content
Permalink
Browse files
Adjust colorramp height on HiDPI screens
  • Loading branch information
elpaso committed Dec 7, 2017
1 parent bac80aa commit 251b2ae
Showing 1 changed file with 2 additions and 1 deletion.
@@ -69,7 +69,8 @@ QSize QgsColorRampButton::sizeHint() const
#ifdef Q_OS_WIN
return QSize( 120, 22 );
#else
return QSize( 120, 28 );
// Adjust height for HiDPI screens
return QSize( 120, std::max( static_cast<int>( fontMetrics().height( ) * 1.4 ), 28 ) );
#endif
}

0 comments on commit 251b2ae

Please sign in to comment.