Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[theme] fix invisile text in field expression widget in dark themes
only on MacOS at the moment
  • Loading branch information
3nids committed Apr 3, 2019
1 parent 7410fb0 commit e2915ff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/qgsfieldexpressionwidget.cpp
Expand Up @@ -18,6 +18,8 @@
#include <QObject>
#include <QKeyEvent>

#include "qgsgui.h"
#include "qgsnative.h"
#include "qgsapplication.h"
#include "qgsfieldexpressionwidget.h"
#include "qgsexpressionbuilderdialog.h"
Expand Down Expand Up @@ -364,7 +366,10 @@ void QgsFieldExpressionWidget::updateLineEditStyle( const QString &expression )
}
else
{
palette.setColor( QPalette::Text, Qt::black );
if ( QgsGui::instance()->nativePlatformInterface()->hasDarkTheme() )
palette.setColor( QPalette::Text, Qt::white );
else
palette.setColor( QPalette::Text, Qt::black );
}
}
mCombo->lineEdit()->setPalette( palette );
Expand Down

0 comments on commit e2915ff

Please sign in to comment.