The selected track foreground color is coming out white, as intended, but the
background color doesn't change.
The relevant code is at src/gui/editors/segment/TrackLabel.cpp:
void
TrackLabel::setSelected(bool on)
{
if (on) {
m_selected = true;
m_instrumentLabel->setPaletteBackgroundColor(palette().highlight());
m_instrumentLabel->setPaletteForegroundColor(palette().highlightedText());
m_trackLabel->setPaletteBackgroundColor(palette().highlight());
m_trackLabel->setPaletteForegroundColor(palette().highlightedText());
} else {
m_selected = false;
m_instrumentLabel->setPaletteBackgroundColor(palette().background());
m_trackLabel->setPaletteBackgroundColor(palette().background());
m_instrumentLabel->setPaletteForegroundColor(palette().text());
m_trackLabel->setPaletteForegroundColor(palette().text());
}
if( currentWidget() ){
currentWidget()->update();
}
}
All of this is probably only working because of Qt3-compatibility. The idiom
for all of this has changed completely.
For example:
http://lists.qgis.org/pipermail/qgis-commit/2006-August/000589.html
http://lists.trolltech.com/qt4-preview-feedback/2005-02/thread00787-0.html
http://www.qtcentre.org/forum/f-qt-programming-2/t-qt4-qtextedit-background-color-2196.html
Basically, we want to create a QPalette, diddle it, and then
m_ourObject->setPallet(diddledPallet) to accomplish the same result in modern
idiom.
I tried a lot of permutations of that, and never got anything to cause a
visible change at all. It was worse than nothing.
I spent two hours on this, and I'm afraid I have to give up in disgust. I'm
throwing this message out so someone else can at least benefit from my
legwork. If anyone figures out how to actually get this to work, I'll help
rewrite all the other obsolete code once I see how to do it.
--
D. Michael McIntyre
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel