[Bug 152128] Color for highlighted replace matches is disabled, but should be active

Kevin Kofler kevin.kofler at chello.at
Sat Nov 17 06:45:06 CET 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=152128         




------- Additional Comments From kevin.kofler chello at  2007-11-17 06:45 -------
FWIW, I added this hack to the Quarticurve style on October 26 exactly to override this behavior (actually, I override the color even for "disabled" because I want it to look like Bluecurve for Qt 3 and GTK+ 2, which shows the selection in blue even for disabled controls):

static QPalette adjustPalette(QPalette p)
{
    /* Force the selection colors to always active. This overrides KDE 4's
       behavior of using window colors for the inactive or disabled
       selection and matches the KDE 3 and GTK+ themes. */
    QBrush highlight = p.brush(QPalette::Active, QPalette::Highlight);
    p.setBrush(QPalette::Inactive, QPalette::Highlight, highlight);
    p.setBrush(QPalette::Disabled, QPalette::Highlight, highlight);
    QBrush highlightedText = p.brush(QPalette::Active, QPalette::HighlightedText);
    p.setBrush(QPalette::Inactive, QPalette::HighlightedText, highlightedText);
    p.setBrush(QPalette::Disabled, QPalette::HighlightedText, highlightedText);
    return p;
}

(Then the first thing all the draw* functions do is calling this on the palette they receive.)


More information about the Kdelibs-bugs mailing list