fix behavior when hint-bar-stretch is present
This commit is contained in:
parent
1b5bf827c6
commit
988737b128
@ -184,10 +184,14 @@ void MeterPrivate::paintBar(QPainter *p, const QString &prefix)
|
|||||||
|
|
||||||
image->setUsingRenderingCache(false);
|
image->setUsingRenderingCache(false);
|
||||||
if (image->hasElement("hint-bar-stretch")) {
|
if (image->hasElement("hint-bar-stretch")) {
|
||||||
|
const QSize imageSize = image->size();
|
||||||
|
image->resize();
|
||||||
|
image->setElementPrefix(prefix);
|
||||||
image->resizeFrame(elementRect.size());
|
image->resizeFrame(elementRect.size());
|
||||||
image->paintFrame(p);
|
image->paintFrame(p, elementRect.topLeft());
|
||||||
|
image->resize(imageSize);
|
||||||
} else {
|
} else {
|
||||||
QSize imageSize = image->size();
|
const QSize imageSize = image->size();
|
||||||
image->resize();
|
image->resize();
|
||||||
QSize tileSize = image->elementSize("bar-active-center");
|
QSize tileSize = image->elementSize("bar-active-center");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user