Skip to content

Commit

Permalink
Adjust colorramp height on HiDPI screens
Browse files Browse the repository at this point in the history
  • Loading branch information
elpaso committed Dec 7, 2017
1 parent bac80aa commit 251b2ae
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgscolorrampbutton.cpp
Expand Up @@ -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
}

Expand Down

0 comments on commit 251b2ae

Please sign in to comment.