Skip to content

Commit 1fdfe30

Browse files
committed
[welcome page] increase text width to avoid reflow on hidpi screens
1 parent 89518f4 commit 1fdfe30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/qgswelcomepageitemsmodel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ void QgsWelcomePageItemDelegate::paint( QPainter* painter, const QStyleOptionVie
7171
int textSize = titleSize * 0.85;
7272

7373
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize ).arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::PathRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
74-
doc.setTextWidth( 800 );
74+
doc.setTextWidth( 2800 );
7575

7676
QPixmap icon = qvariant_cast<QPixmap>( index.data( Qt::DecorationRole ) );
7777
if ( !icon.isNull() )
@@ -94,7 +94,7 @@ QSize QgsWelcomePageItemDelegate::sizeHint( const QStyleOptionViewItem & option,
9494
int textSize = titleSize * 0.85;
9595

9696
doc.setHtml( QString( "<div style='font-size:%1px;'><span style='font-size:%2px;font-weight:bold;'>%3</span><br>%4<br>%5</div>" ).arg( textSize ).arg( titleSize ).arg( index.data( QgsWelcomePageItemsModel::TitleRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::PathRole ).toString() ).arg( index.data( QgsWelcomePageItemsModel::CrsRole ).toString() ) );
97-
doc.setTextWidth( 800 );
97+
doc.setTextWidth( 2800 );
9898

9999
QPixmap icon = qvariant_cast<QPixmap>( index.data( Qt::DecorationRole ) );
100100

0 commit comments

Comments
 (0)