From 988737b128a45206ae24f79b35f83e6db8a88678 Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 21 Jun 2012 15:32:52 +0200 Subject: [PATCH] fix behavior when hint-bar-stretch is present --- widgets/meter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/widgets/meter.cpp b/widgets/meter.cpp index d1007e556..6d35275ee 100644 --- a/widgets/meter.cpp +++ b/widgets/meter.cpp @@ -184,10 +184,14 @@ void MeterPrivate::paintBar(QPainter *p, const QString &prefix) image->setUsingRenderingCache(false); if (image->hasElement("hint-bar-stretch")) { + const QSize imageSize = image->size(); + image->resize(); + image->setElementPrefix(prefix); image->resizeFrame(elementRect.size()); - image->paintFrame(p); + image->paintFrame(p, elementRect.topLeft()); + image->resize(imageSize); } else { - QSize imageSize = image->size(); + const QSize imageSize = image->size(); image->resize(); QSize tileSize = image->elementSize("bar-active-center");