Skip to content

Commit 251b2ae

Browse files
committedDec 7, 2017
Adjust colorramp height on HiDPI screens
1 parent bac80aa commit 251b2ae

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/gui/qgscolorrampbutton.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ QSize QgsColorRampButton::sizeHint() const
6969
#ifdef Q_OS_WIN
7070
return QSize( 120, 22 );
7171
#else
72-
return QSize( 120, 28 );
72+
// Adjust height for HiDPI screens
73+
return QSize( 120, std::max( static_cast<int>( fontMetrics().height( ) * 1.4 ), 28 ) );
7374
#endif
7475
}
7576

0 commit comments

Comments
 (0)
Please sign in to comment.