Skip to content

Commit 092dc69

Browse files
authored
[GUI] Remove italics and use monospaced font for expression fields in the attribute table. Related to issue qgis#44638 (qgis#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 qgis#44638 regarding the readability challenges caused by italicized font in expression fields.Related issue: qgis#44638 * [gui] Reformat code to match standard style
1 parent 17b8181 commit 092dc69

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gui/qgsfieldexpressionwidget.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,8 @@ void QgsFieldExpressionWidget::updateLineEditStyle( const QString &expression )
392392
currentField( &isExpression, &isValid );
393393
}
394394
QFont font = mCombo->lineEdit()->font();
395-
font.setItalic( isExpression );
395+
font.setFamily( ( QgsCodeEditor::getMonospaceFont() ).family() );
396+
font.setItalic( false );
396397
mCombo->lineEdit()->setFont( font );
397398

398399
if ( isExpression && !isValid )

0 commit comments

Comments
 (0)