[Kst] branches/work/kst/portto4/kst/src/libkstapp
George Staikos
staikos at kde.org
Wed May 30 18:58:02 CEST 2007
SVN commit 669867 by staikos:
- hack the label into the right place for now
- give plots a solid background (white for now)
M +5 -2 labelitem.cpp
M +1 -0 plotitem.cpp
--- branches/work/kst/portto4/kst/src/libkstapp/labelitem.cpp #669866:669867
@@ -51,8 +51,11 @@
const qreal w = pen().widthF();
painter->save();
QRect box = rect().adjusted(w, w, -w, -w).toRect();
- painter->translate(rect().topLeft());
- Label::RenderContext rc(QFont().family(), 16, painter);
+ QFont font;
+ font.setPointSize(16);
+ QFontMetrics fm(font);
+ painter->translate(QPoint(box.x(), box.y() + fm.ascent() + fm.descent() + 1));
+ Label::RenderContext rc(font.family(), 16, painter);
Label::renderLabel(rc, _parsed->chunk);
painter->restore();
}
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #669866:669867
@@ -22,6 +22,7 @@
setFlags(ItemIsMovable | ItemIsSelectable | ItemIsFocusable);
parent->setMouseMode(View::Create);
parent->setCursor(Qt::CrossCursor);
+ setBrush(Qt::white);
//If the mouseMode is changed again before we're done with creation
//delete ourself.
More information about the Kst
mailing list