[Kst] extragear/graphics/kst/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Tue Dec 6 05:54:17 CET 2005
SVN commit 485909 by netterfield:
Print background of labels when not transparent.
M +11 -3 kstviewlabel.cpp
--- trunk/extragear/graphics/kst/kst/kstviewlabel.cpp #485908:485909
@@ -224,6 +224,7 @@
void KstViewLabel::drawToPainter(Label::Parsed *lp, QPainter& p) {
+
int hJust = KST_JUSTIFY_H(_justify);
if (QApplication::reverseLayout()) {
if (hJust == KST_JUSTIFY_H_NONE) {
@@ -322,8 +323,9 @@
void KstViewLabel::paint(KstPainter& p, const QRegion& bounds) {
+ p.save();
if (p.type() == KstPainter::P_PRINT) {
- p.save();
+ //p.save();
if (_autoResize) {
adjustSizeForText(p.window());
} else {
@@ -332,10 +334,15 @@
const QRect geom(geometry());
p.setViewport(geom);
p.setWindow(0, 0, geom.width(), geom.height());
+
+ if (!_transparent) {
+ p.fillRect(p.window(), backgroundColor());
+ }
+
drawToPainter(_parsed, p);
//setDirty();
- p.restore();
- } else {
+ //p.restore();
+ } else {
if (p.type() == KstPainter::P_UPDATE) {
setDirty();
}
@@ -357,6 +364,7 @@
_backBuffer.paintInto(p, geometry());
}
}
+ p.restore();
KstBorderedViewObject::paint(p, bounds);
}
More information about the Kst
mailing list