diff --git a/src/plugins/texteditor/fontsettingspage.h b/src/plugins/texteditor/fontsettingspage.h index 1d3d676def3..16365a45145 100644 --- a/src/plugins/texteditor/fontsettingspage.h +++ b/src/plugins/texteditor/fontsettingspage.h @@ -57,6 +57,7 @@ public: ShowBackgroundControl = 0x2, ShowFontControls = 0x4, ShowUnderlineControl = 0x8, + ShowFontAndUnderlineControls = ShowFontControls | ShowUnderlineControl, AllControls = 0xF, AllControlsExceptUnderline = AllControls & ~ShowUnderlineControl, }; diff --git a/src/plugins/texteditor/texteditorconstants.cpp b/src/plugins/texteditor/texteditorconstants.cpp index 5d137a1e274..b638ff4d17b 100644 --- a/src/plugins/texteditor/texteditorconstants.cpp +++ b/src/plugins/texteditor/texteditorconstants.cpp @@ -99,6 +99,7 @@ const char *nameForStyle(TextStyle style) case C_WARNING: return "Warning"; case C_WARNING_CONTEXT: return "WarningContext"; + case C_DECLARATION: return "Declaration"; case C_LAST_STYLE_SENTINEL: return "LastStyleSentinel"; } diff --git a/src/plugins/texteditor/texteditorconstants.h b/src/plugins/texteditor/texteditorconstants.h index 19cf640957a..ff69f45cb51 100644 --- a/src/plugins/texteditor/texteditorconstants.h +++ b/src/plugins/texteditor/texteditorconstants.h @@ -98,6 +98,8 @@ enum TextStyle : quint8 { C_ERROR, C_ERROR_CONTEXT, + C_DECLARATION, + C_LAST_STYLE_SENTINEL }; diff --git a/src/plugins/texteditor/texteditorsettings.cpp b/src/plugins/texteditor/texteditorsettings.cpp index f5d45c04faa..f47f4eceb1d 100644 --- a/src/plugins/texteditor/texteditorsettings.cpp +++ b/src/plugins/texteditor/texteditorsettings.cpp @@ -305,7 +305,10 @@ TextEditorSettings::TextEditorSettings(QObject *parent) QColor(255, 190, 0), QTextCharFormat::DotLine, FormatDescription::ShowUnderlineControl); - + formatDescr.emplace_back(C_DECLARATION, + tr("Declaration"), + tr("Declaration of a function, variable, and so on."), + FormatDescription::ShowFontAndUnderlineControls); d->m_fontSettingsPage = new FontSettingsPage(formatDescr, Constants::TEXT_EDITOR_FONT_SETTINGS,