diff --git a/python/plugins/processing/script/ScriptEditorDialog.py b/python/plugins/processing/script/ScriptEditorDialog.py index 373eb2c964cc..522387112f8f 100644 --- a/python/plugins/processing/script/ScriptEditorDialog.py +++ b/python/plugins/processing/script/ScriptEditorDialog.py @@ -116,7 +116,8 @@ def clean_up_store(): QgsApplication.getThemeIcon("/mActionDecreaseFont.svg") ) self.actionToggleComment.setIcon( - QgsApplication.getThemeIcon("console/iconCommentEditorConsole.svg") + QgsApplication.getThemeIcon("console/iconCommentEditorConsole.svg"), + self.palette().color(QPalette.ColorRole.WindowText), ) # Connect signals and slots diff --git a/src/gui/codeeditors/qgscodeeditor.cpp b/src/gui/codeeditors/qgscodeeditor.cpp index 64e9f5537a9d..119b9b3441c2 100644 --- a/src/gui/codeeditors/qgscodeeditor.cpp +++ b/src/gui/codeeditors/qgscodeeditor.cpp @@ -282,7 +282,7 @@ void QgsCodeEditor::contextMenuEvent( QContextMenuEvent *event ) { QAction *toggleCommentAction = new QAction( tr( "Toggle Comment" ), menu ); toggleCommentAction->setShortcut( QStringLiteral( "Ctrl+:" ) ); - toggleCommentAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "console/iconCommentEditorConsole.svg" ) ) ); + toggleCommentAction->setIcon( QgsApplication::getThemeIcon( QStringLiteral( "console/iconCommentEditorConsole.svg" ), palette().color( QPalette::ColorRole::WindowText ) ) ); toggleCommentAction->setEnabled( !isReadOnly() ); connect( toggleCommentAction, &QAction::triggered, this, &QgsCodeEditor::toggleComment ); menu->addAction( toggleCommentAction );