Replace QPalette::Background with QPalette::Window
This commit is contained in:
@@ -91,7 +91,7 @@ void FreeSpaceBar::paintEvent(QPaintEvent*) {
|
||||
// Draw the reflection
|
||||
// Create the reflected pixmap
|
||||
QImage reflection(reflection_rect.size(), QImage::Format_ARGB32_Premultiplied);
|
||||
reflection.fill(palette().color(QPalette::Background).rgba());
|
||||
reflection.fill(palette().color(QPalette::Window).rgba());
|
||||
QPainter p(&reflection);
|
||||
|
||||
// Set up the transformation
|
||||
@@ -124,7 +124,6 @@ void FreeSpaceBar::paintEvent(QPaintEvent*) {
|
||||
void FreeSpaceBar::DrawBar(QPainter* p, const QRect &r) {
|
||||
|
||||
p->setRenderHint(QPainter::Antialiasing, true);
|
||||
p->setRenderHint(QPainter::HighQualityAntialiasing, true);
|
||||
|
||||
QRect bar_rect(r);
|
||||
bar_rect.setWidth(float(bar_rect.width()) * (float(total_ - free_) / total_));
|
||||
|
||||
@@ -241,7 +241,7 @@ void VolumeSlider::generateGradient() {
|
||||
QPainter p(&gradient_image);
|
||||
|
||||
QLinearGradient gradient(gradient_image.rect().topLeft(), gradient_image.rect().topRight());
|
||||
gradient.setColorAt(0, palette().color(QPalette::Background));
|
||||
gradient.setColorAt(0, palette().color(QPalette::Window));
|
||||
gradient.setColorAt(1, palette().color(QPalette::Highlight));
|
||||
p.fillRect(gradient_image.rect(), QBrush(gradient));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user