Mercurial > hg > svgui
comparison widgets/Thumbwheel.cpp @ 541:e233627a923e
* spiff up thumbwheels
author | Chris Cannam |
---|---|
date | Mon, 03 Aug 2009 12:55:00 +0000 |
parents | 06b5f110c5d2 |
children | 5930f2b0b1d2 |
comparison
equal
deleted
inserted
replaced
540:1092181784a3 | 541:e233627a923e |
---|---|
536 | 536 |
537 x0 += bw; | 537 x0 += bw; |
538 x1 += bw; | 538 x1 += bw; |
539 x2 += bw; | 539 x2 += bw; |
540 | 540 |
541 int grey = lrintf(255 * depth); | 541 int grey = lrintf(120 * depth); |
542 | |
542 QColor fc = QColor(grey, grey, grey); | 543 QColor fc = QColor(grey, grey, grey); |
543 QColor oc = palette().dark().color(); | 544 // QColor oc = fc.dark(150); //palette().dark().color(); |
544 | 545 QColor oc = palette().highlight().color(); |
545 paint.setPen(oc); | 546 |
546 paint.setBrush(fc); | 547 paint.setPen(fc); |
547 | |
548 if (m_orientation == Qt::Horizontal) { | |
549 paint.drawRect(QRectF(x1, bw, x2 - x1, height() - bw*2)); | |
550 } else { | |
551 paint.drawRect(QRectF(bw, x1, width() - bw*2, x2 - x1)); | |
552 } | |
553 | 548 |
554 if (m_showScale) { | 549 if (m_showScale) { |
555 | 550 |
556 paint.setBrush(oc); | 551 paint.setBrush(oc); |
557 | 552 |
569 } else { | 564 } else { |
570 paint.drawRect(QRectF(bw, x1, (width() - bw*2) * prop, x2 - x1)); | 565 paint.drawRect(QRectF(bw, x1, (width() - bw*2) * prop, x2 - x1)); |
571 } | 566 } |
572 } | 567 } |
573 | 568 |
574 paint.setPen(oc); | 569 paint.setPen(fc); |
575 paint.setBrush(palette().background().color()); | 570 paint.setBrush(palette().background().color()); |
576 | 571 |
577 if (m_orientation == Qt::Horizontal) { | 572 if (m_orientation == Qt::Horizontal) { |
578 paint.drawRect(QRectF(x0, bw, x1 - x0, height() - bw*2)); | 573 paint.drawRect(QRectF(x0, bw, x1 - x0, height() - bw*2)); |
579 } else { | 574 } else { |