diff options
| author | Alessandro Portale <alessandro.portale@qt.io> | 2023-04-25 11:22:56 +0200 |
|---|---|---|
| committer | Alessandro Portale <alessandro.portale@qt.io> | 2023-05-03 09:20:58 +0000 |
| commit | e15b38494433a6f3e608f561517966ea0d745ddf (patch) | |
| tree | 56a76ce9a2de007f8b2a537fafae647a1e852fd2 /src | |
| parent | 89b589c0ea8f886a246da004ba01d57219fceee4 (diff) | |
| download | qt-creator-e15b38494433a6f3e608f561517966ea0d745ddf.tar.gz | |
TextEditor: Use icons with better contrast in TextMark tooltip
The "_TOOLBAR" variants do not have a good contrast in some themes. This
also introduces the missing non-toolbar variation for the EYE_OPEN icon.
Fixes: QTCREATORBUG-29087
Change-Id: I64c8c6b7f5696d640c7bea7a431982caacd70050
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Diffstat (limited to 'src')
| -rw-r--r-- | src/libs/utils/utilsicons.cpp | 2 | ||||
| -rw-r--r-- | src/libs/utils/utilsicons.h | 1 | ||||
| -rw-r--r-- | src/plugins/texteditor/textmark.cpp | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/libs/utils/utilsicons.cpp b/src/libs/utils/utilsicons.cpp index cbc2ddf64f..01b1f0c1db 100644 --- a/src/libs/utils/utilsicons.cpp +++ b/src/libs/utils/utilsicons.cpp @@ -227,6 +227,8 @@ const Icon INTERRUPT_SMALL_TOOLBAR({ {":/utils/images/interrupt_small.png", Theme::IconsInterruptToolBarColor}}); const Icon BOUNDING_RECT({ {":/utils/images/boundingrect.png", Theme::IconsBaseColor}}); +const Icon EYE_OPEN({ + {":/utils/images/eye_open.png", Theme::PanelTextColorMid}}, Icon::Tint); const Icon EYE_OPEN_TOOLBAR({ {":/utils/images/eye_open.png", Theme::IconsBaseColor}}); const Icon EYE_CLOSED_TOOLBAR({ diff --git a/src/libs/utils/utilsicons.h b/src/libs/utils/utilsicons.h index 3e5009c94c..5a75267a36 100644 --- a/src/libs/utils/utilsicons.h +++ b/src/libs/utils/utilsicons.h @@ -121,6 +121,7 @@ QTCREATOR_UTILS_EXPORT extern const Icon STOP_SMALL_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon INTERRUPT_SMALL; QTCREATOR_UTILS_EXPORT extern const Icon INTERRUPT_SMALL_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon BOUNDING_RECT; +QTCREATOR_UTILS_EXPORT extern const Icon EYE_OPEN; QTCREATOR_UTILS_EXPORT extern const Icon EYE_OPEN_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon EYE_CLOSED_TOOLBAR; QTCREATOR_UTILS_EXPORT extern const Icon REPLACE; diff --git a/src/plugins/texteditor/textmark.cpp b/src/plugins/texteditor/textmark.cpp index 2988de1d11..4f86bc5f94 100644 --- a/src/plugins/texteditor/textmark.cpp +++ b/src/plugins/texteditor/textmark.cpp @@ -286,7 +286,7 @@ void TextMark::addToToolTipLayout(QGridLayout *target) const if (m_category.id.isValid() && !m_lineAnnotation.isEmpty()) { auto visibilityAction = new QAction; const bool isHidden = TextDocument::marksAnnotationHidden(m_category.id); - visibilityAction->setIcon(Utils::Icons::EYE_OPEN_TOOLBAR.icon()); + visibilityAction->setIcon(Utils::Icons::EYE_OPEN.icon()); const QString tooltip = (isHidden ? Tr::tr("Show inline annotations for %1") : Tr::tr("Temporarily hide inline annotations for %1")) .arg(m_category.displayName); @@ -302,7 +302,7 @@ void TextMark::addToToolTipLayout(QGridLayout *target) const } if (m_settingsPage.isValid()) { auto settingsAction = new QAction; - settingsAction->setIcon(Utils::Icons::SETTINGS_TOOLBAR.icon()); + settingsAction->setIcon(Utils::Icons::SETTINGS.icon()); settingsAction->setToolTip(Tr::tr("Show Diagnostic Settings")); QObject::connect(settingsAction, &QAction::triggered, Core::ICore::instance(), [id = m_settingsPage] { Core::ICore::showOptionsDialog(id); }, |
