Address review

This commit is contained in:
Mathieu Pellerin 2025-01-29 14:06:33 +07:00 committed by Nyall Dawson
parent efdb16ef36
commit b4b2dfdd21
2 changed files with 3 additions and 2 deletions

View File

@ -116,7 +116,8 @@ class ScriptEditorDialog(BASE, WIDGET):
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

View File

@ -318,7 +318,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 );