Skip to content

Commit

Permalink
[GUI] Remove italics and use monospaced font for expression fields in…
Browse files Browse the repository at this point in the history
… the attribute table. Related to issue #44638  (#59139)

* [gui] Remove italics and use monospaced font for expression fields in attribute tableThis commit modifies QgsFieldExpressionWidget to ensure that expression fields in the attribute table are displayed using a regular monospaced font instead of the default italics. This improves readability and ensures consistency between different parts of the interface.- Updated QgsFieldExpressionWidget::updateLineEditStyle() to set font to non-italic and apply monospaced family.- Addressed issue reported in #44638 regarding the readability challenges caused by italicized font in expression fields.Related issue: #44638

* [gui] Reformat code to match standard style
  • Loading branch information
lanckmann authored Nov 6, 2024
1 parent 17b8181 commit 092dc69
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/qgsfieldexpressionwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,8 @@ void QgsFieldExpressionWidget::updateLineEditStyle( const QString &expression )
currentField( &isExpression, &isValid );
}
QFont font = mCombo->lineEdit()->font();
font.setItalic( isExpression );
font.setFamily( ( QgsCodeEditor::getMonospaceFont() ).family() );
font.setItalic( false );
mCombo->lineEdit()->setFont( font );

if ( isExpression && !isValid )
Expand Down

0 comments on commit 092dc69

Please sign in to comment.