comparison widgets/Thumbwheel.cpp @ 1193:54e6be7ebe11 levelpanwidget

Some adjustments to make view elements clearer and more correctly sized, especially on hidpi (non-pixel-doubling) systems
author Chris Cannam
date Thu, 15 Dec 2016 15:34:33 +0000
parents bf509e47e324
children a34a2a25907c
comparison
equal deleted inserted replaced
1192:bf509e47e324 1193:54e6be7ebe11
453 453
454 QSize imageSize = size() * devicePixelRatio(); 454 QSize imageSize = size() * devicePixelRatio();
455 m_cache = QImage(imageSize, QImage::Format_ARGB32); 455 m_cache = QImage(imageSize, QImage::Format_ARGB32);
456 m_cache.fill(Qt::transparent); 456 m_cache.fill(Qt::transparent);
457 457
458 double w = m_cache.width(); 458 int w = m_cache.width();
459 double h = m_cache.height(); 459 int h = m_cache.height();
460
461 int bw = 3; // border width 460 int bw = 3; // border width
462 461
463 QRect subclip; 462 QRect subclip;
464 if (m_orientation == Qt::Horizontal) { 463 if (m_orientation == Qt::Horizontal) {
465 subclip = QRect(bw, bw+1, w - bw*2, h - bw*2 - 2); 464 subclip = QRect(bw, bw+1, w - bw*2, h - bw*2 - 2);