Fix incorrect font color detection for DeviceView (threshold 50)
This commit is contained in:
parent
8823e28fa0
commit
290fddaf55
1 changed files with 3 additions and 1 deletions
|
|
@ -503,7 +503,9 @@ void DeviceView::paintEvent(QPaintEvent* /* event */)
|
|||
font.setPixelSize(posh / 2);
|
||||
painter.setFont(font);
|
||||
|
||||
if(currentColor.value() > 127)
|
||||
unsigned int luma = (unsigned int)(0.2126f * currentColor.red() + 0.7152f * currentColor.green() + 0.0722f * currentColor.blue());
|
||||
|
||||
if(luma > 127)
|
||||
{
|
||||
painter.setPen(Qt::black);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue