Mercurial > hg > svgui
comparison view/View.cpp @ 296:ea37c229a578
* Fix #1757772 tempo, dynamic related plug-ins bug -- make auto-align
only auto-align if there is a unit involved
* Fix #1755366 text layer bug in retrieved session
* Fix input model selection in plugin parameter dialog (was being ignored)
* Use lighter background than the standard widget one for panes (assuming the
widget background is light but not white) -- similarly darker if dark
* Fix colour reference counting in loaded session in SingleColourLayer
* Reset overview pane colour when switching dark background on or off
author | Chris Cannam |
---|---|
date | Tue, 14 Aug 2007 13:58:53 +0000 |
parents | 24fc90078754 |
children | 226cb289bdf4 |
comparison
equal
deleted
inserted
replaced
295:5804703450d8 | 296:ea37c229a578 |
---|---|
469 | 469 |
470 QColor widgetbg = palette().window().color(); | 470 QColor widgetbg = palette().window().color(); |
471 bool widgetLight = | 471 bool widgetLight = |
472 (widgetbg.red() + widgetbg.green() + widgetbg.blue()) > 384; | 472 (widgetbg.red() + widgetbg.green() + widgetbg.blue()) > 384; |
473 | 473 |
474 if (widgetLight == light) return widgetbg; | 474 if (widgetLight == light) { |
475 if (widgetLight) { | |
476 return widgetbg.light(); | |
477 } else { | |
478 return widgetbg.dark(); | |
479 } | |
480 } | |
475 else if (light) return Qt::white; | 481 else if (light) return Qt::white; |
476 else return Qt::black; | 482 else return Qt::black; |
477 } | 483 } |
478 | 484 |
479 QColor | 485 QColor |