[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: KDE/kdelibs/kate/search
From:       Matthew Woehlke <mwoehlke () tibco ! com>
Date:       2010-01-25 19:40:23
Message-ID: 4B5DF3A7.6090404 () tibco ! com
[Download RAW message or body]

Close, but you missed a parameter; since this text is against Window 
Background, not View Background, you need KColorScheme::Window after 
QPalette::WindowText, or you will use the ActiveText color from the 
wrong set.

Matthew

On 2010-01-25 12:58, Harsh Chouraria J wrote:
> SVN commit 1080162 by harshj:
> 
> BUG: 178974
> 
> * Add in a proper new message if the search wraps from bottom to top.
> * Set wrap messages as ActiveText coloring and not found ones as NegativeText, for \
> better attention/usability.
> 
> 
> 
> M  +14 -1     katesearchbar.cpp
> M  +1 -0      katesearchbar.h
> 
> 
> --- trunk/KDE/kdelibs/kate/search/katesearchbar.cpp #1080161:1080162
> @@ -304,16 +304,24 @@
> }
> 
> // Update status label
> +    QPalette foreground(m_incUi->status->palette());
> if (m_incUi != NULL) {
> switch (matchResult) {
> case MatchFound: // FALLTHROUGH
> case MatchNothing:
> +            KColorScheme::adjustForeground(foreground, KColorScheme::NormalText, \
> QPalette::WindowText); m_incUi->status->setText("");
> break;
> case MatchWrapped:
> -            m_incUi->status->setText(i18n("Reached bottom, continued from top"));
> +            KColorScheme::adjustForeground(foreground, KColorScheme::ActiveText, \
> QPalette::WindowText); +            if(m_searchDirection == SearchBackward) {
> +                m_incUi->status->setText(i18n("Reached top, continued from \
> bottom")); +            } else {
> +                m_incUi->status->setText(i18n("Reached bottom, continued from \
> top")); +            }
> break;
> case MatchMismatch:
> +            KColorScheme::adjustForeground(foreground, KColorScheme::NegativeText, \
> QPalette::WindowText); m_incUi->status->setText(i18n("Not found"));
> break;
> case MatchNeutral:
> @@ -323,6 +331,7 @@
> }
> 
> lineEdit->setPalette(background);
> +    m_incUi->status->setPalette(foreground);
> }
> 
> 
> @@ -640,6 +649,10 @@
> 
> 
> bool KateSearchBar::find(SearchDirection searchDirection, const QString * \
> replacement) { +
> +    // Store search direction for proper visual feedback on top/bottom wraps
> +    m_searchDirection = searchDirection;
> +
> // What to find?
> if (searchPattern().isEmpty()) {
> return false; // == Pattern error
> --- trunk/KDE/kdelibs/kate/search/katesearchbar.h #1080161:1080162
> @@ -176,6 +176,7 @@
> QAction * m_incMenuFromCursor;
> QAction * m_incMenuHighlightAll;
> KTextEditor::Cursor m_incInitCursor;
> +    SearchDirection m_searchDirection; // For use in indicateMatch()
> 
> // Power search related
> Ui::PowerSearchBar * m_powerUi;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic