Changeset View
Changeset View
Standalone View
Standalone View
plugins/contextbrowser/contextbrowser.cpp
Show First 20 Lines • Show All 648 Lines • ▼ Show 20 Line(s) | 648 | void ContextBrowserPlugin::clearMouseHover() { | |||
---|---|---|---|---|---|
649 | m_mouseHoverCursor = KTextEditor::Cursor::invalid(); | 649 | m_mouseHoverCursor = KTextEditor::Cursor::invalid(); | ||
650 | m_mouseHoverDocument.clear(); | 650 | m_mouseHoverDocument.clear(); | ||
651 | } | 651 | } | ||
652 | 652 | | |||
653 | Attribute::Ptr ContextBrowserPlugin::highlightedUseAttribute(KTextEditor::View* view) const { | 653 | Attribute::Ptr ContextBrowserPlugin::highlightedUseAttribute(KTextEditor::View* view) const { | ||
654 | if( !m_highlightAttribute ) { | 654 | if( !m_highlightAttribute ) { | ||
655 | m_highlightAttribute = Attribute::Ptr( new Attribute() ); | 655 | m_highlightAttribute = Attribute::Ptr( new Attribute() ); | ||
656 | m_highlightAttribute->setDefaultStyle(KTextEditor::dsNormal); | 656 | m_highlightAttribute->setDefaultStyle(KTextEditor::dsNormal); | ||
657 | m_highlightAttribute->setForeground(m_highlightAttribute->selectedForeground()); | 657 | auto foreground = view->defaultStyleAttribute(KTextEditor::dsNormal)->selectedForeground().color(); | ||
658 | m_highlightAttribute->setForeground(foreground); | ||||
658 | m_highlightAttribute->setBackgroundFillWhitespace(true); | 659 | m_highlightAttribute->setBackgroundFillWhitespace(true); | ||
659 | 660 | | |||
660 | auto iface = qobject_cast<KTextEditor::ConfigInterface*>(view); | 661 | auto iface = qobject_cast<KTextEditor::ConfigInterface*>(view); | ||
661 | auto background = iface->configValue(QStringLiteral("search-highlight-color")).value<QColor>(); | 662 | auto background = iface->configValue(QStringLiteral("search-highlight-color")).value<QColor>(); | ||
662 | m_highlightAttribute->setBackground(background); | 663 | m_highlightAttribute->setBackground(background); | ||
663 | } | 664 | } | ||
664 | return m_highlightAttribute; | 665 | return m_highlightAttribute; | ||
665 | } | 666 | } | ||
▲ Show 20 Lines • Show All 832 Lines • Show Last 20 Lines |