Skip to content

Commit

Permalink
chore: [editor] optimize completion code color
Browse files Browse the repository at this point in the history
Log:
Change-Id: Iaad8a35f730a19fa7af5db206ffcb10c554d6362
  • Loading branch information
deepin-mozart committed Apr 25, 2024
1 parent 8c978a7 commit 55494fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ void CodeCompletionDelegate::paint(QPainter *painter, const QStyleOptionViewItem

opt.rect.adjust(iconRect.x() + 20, 0, 0, 0);
opt.displayAlignment = Qt::AlignVCenter;

// Set the text color to windowText color
painter->setPen(option.palette.color(QPalette::WindowText));

paintItemText(painter, opt, index);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,9 @@ void CodeCompletionExtendWidgetPrivate::initUI()

messageEdit = new QPlainTextEdit(q);
messageEdit->setReadOnly(true);
QPalette pal = messageEdit->palette();
pal.setColor(QPalette::Text, q->palette().color(QPalette::WindowText));
messageEdit->setPalette(pal);

QHBoxLayout *hLayout = new QHBoxLayout;
hLayout->setContentsMargins(5, 0, 0, 0);
Expand Down

0 comments on commit 55494fd

Please sign in to comment.