Skip to content
Permalink
Browse files

[ui][hidpi] Form line edit: compute icon size instead of hardcoding

  • Loading branch information
elpaso committed Nov 23, 2017
1 parent e98842e commit fe933d2de31b39b145052a87f27bcd8e9d67ccf6
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gui/qgsfilterlineedit.cpp
@@ -32,13 +32,14 @@ QgsFilterLineEdit::QgsFilterLineEdit( QWidget *parent, const QString &nullValue
setMouseTracking( true );

QIcon clearIcon = QgsApplication::getThemeIcon( "/mIconClearText.svg" );
mClearIconSize = QSize( 16, 16 );
int iconSize = Qgis::UI_SCALE_FACTOR * fontMetrics().height();
mClearIconSize = QSize( iconSize, iconSize );
mClearIconPixmap = clearIcon.pixmap( mClearIconSize );
QIcon hoverIcon = QgsApplication::getThemeIcon( "/mIconClearTextHover.svg" );
mClearHoverPixmap = hoverIcon.pixmap( mClearIconSize );

QIcon searchIcon = QgsApplication::getThemeIcon( "/search.svg" );
mSearchIconSize = QSize( 16, 16 );
mSearchIconSize = QSize( iconSize, iconSize );
mSearchIconPixmap = searchIcon.pixmap( mSearchIconSize );

connect( this, &QLineEdit::textChanged, this,

1 comment on commit fe933d2

@nyalldawson

This comment has been minimized.

Copy link
Collaborator

@nyalldawson nyalldawson commented on fe933d2 Nov 23, 2017

@elpaso Fix looks good here - thanks!

Please sign in to comment.
You can’t perform that action at this time.