From 6db80678214169d4406f48f813b07a452b140358 Mon Sep 17 00:00:00 2001 From: Artem Sokolovskii Date: Fri, 9 Feb 2024 09:48:56 +0100 Subject: [PATCH] ClangFormat: Fix warning readability message on dark theme Fixes: QTCREATORBUG-30339 Change-Id: I57291907656b379468a066a09e767b886f17d7a0 Reviewed-by: Reviewed-by: David Schulz --- .../clangformat/clangformatglobalconfigwidget.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/plugins/clangformat/clangformatglobalconfigwidget.cpp b/src/plugins/clangformat/clangformatglobalconfigwidget.cpp index 973271b8c3c..7027511868e 100644 --- a/src/plugins/clangformat/clangformatglobalconfigwidget.cpp +++ b/src/plugins/clangformat/clangformatglobalconfigwidget.cpp @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -68,7 +69,7 @@ private: QCheckBox *m_formatOnSave; QCheckBox *m_useCustomSettingsCheckBox; QCheckBox *m_useGlobalSettings; - QLabel *m_currentProjectLabel; + InfoLabel *m_currentProjectLabel; }; ClangFormatGlobalConfigWidget::ClangFormatGlobalConfigWidget(ICodeStylePreferences *codeStyle, @@ -95,10 +96,10 @@ ClangFormatGlobalConfigWidget::ClangFormatGlobalConfigWidget(ICodeStylePreferenc m_useGlobalSettings->hide(); m_useCustomSettings = ClangFormatSettings::instance().useCustomSettings(); - m_currentProjectLabel = new QLabel( + m_currentProjectLabel = new Utils::InfoLabel( Tr::tr("Please note that the current project includes a .clang-format file, which will be " - "used for code indenting and formatting.")); - m_currentProjectLabel->setStyleSheet("QLabel { color : red; }"); + "used for code indenting and formatting."), + Utils::InfoLabel::Warning); m_currentProjectLabel->setWordWrap(true); using namespace Layouting;