comparison widgets/Thumbwheel.cpp @ 1478:d39db4673676 by-id

Fix a number of Qt deprecation warnings
author Chris Cannam
date Wed, 03 Jul 2019 08:55:02 +0100
parents c8a6fd3f9dff
children bbc3f537564c
comparison
equal deleted inserted replaced
1477:0769eaacc6bf 1478:d39db4673676
464 subclip = QRect(bw+1, bw, w - bw*2 - 2, h - bw*2); 464 subclip = QRect(bw+1, bw, w - bw*2 - 2, h - bw*2);
465 } 465 }
466 466
467 QPainter paint(&m_cache); 467 QPainter paint(&m_cache);
468 paint.setClipRect(m_cache.rect()); 468 paint.setClipRect(m_cache.rect());
469 paint.fillRect(subclip, palette().background().color()); 469 paint.fillRect(subclip, palette().window().color());
470 470
471 paint.setRenderHint(QPainter::Antialiasing, true); 471 paint.setRenderHint(QPainter::Antialiasing, true);
472 472
473 double w0 = 0.5; 473 double w0 = 0.5;
474 double w1 = w - 0.5; 474 double w1 = w - 0.5;
562 paint.drawRect(QRectF(bw, x1, (w - bw*2) * prop, x2 - x1)); 562 paint.drawRect(QRectF(bw, x1, (w - bw*2) * prop, x2 - x1));
563 } 563 }
564 } 564 }
565 565
566 paint.setPen(fc); 566 paint.setPen(fc);
567 paint.setBrush(palette().background().color()); 567 paint.setBrush(palette().window().color());
568 568
569 if (m_orientation == Qt::Horizontal) { 569 if (m_orientation == Qt::Horizontal) {
570 paint.drawRect(QRectF(x0, bw, x1 - x0, h - bw*2)); 570 paint.drawRect(QRectF(x0, bw, x1 - x0, h - bw*2));
571 } else { 571 } else {
572 paint.drawRect(QRectF(bw, x0, w - bw*2, x1 - x0)); 572 paint.drawRect(QRectF(bw, x0, w - bw*2, x1 - x0));