A hack to compute more eye-focused contrast values
| 54 | |
| 55 | //A hack to compute more eye-focused contrast values |
| 56 | static double readabilityContrast(QColor foreground, QColor background) |
| 57 | { |
| 58 | dampColors(foreground); |
| 59 | dampColors(background); |
| 60 | return abs(foreground.green() - background.green()) + abs(foreground.red() - background.red()) + abs(foreground.blue() - background.blue()); |
| 61 | } |
| 62 | |
| 63 | void ExpandingDelegate::paint(QPainter* painter, const QStyleOptionViewItem& optionOld, const QModelIndex& index) const |
| 64 | { |
no test coverage detected