forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -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({
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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); },
|
||||
|
||||
Reference in New Issue
Block a user