[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Sat Jan 3 03:09:39 CET 2004
CVS commit by arwalker:
Ensure that while performing a drag/drop operation on a text label that the pixmap is drawn correctly for rotated text.
M +5 -2 kstlabel.cpp 1.25
M +1 -0 kstlabel.h 1.17
M +6 -6 kstview.cpp 1.70
--- kdeextragear-2/kst/kst/kstlabel.cpp #1.24:1.25
@@ -41,4 +41,5 @@ KstLabel::KstLabel(const QString &in_tex
_y = in_Y;
Justify = in_j;
+ v_offset = 0;
FontName = "helvetica";
@@ -427,4 +428,6 @@ void KstLabel::draw(QPainter &p, int px,
rect.normalize( );
+ v_offset = (int)(y - y_upper);
+
if( Rotation == 0 ) {
QRegion rgn( rect );
--- kdeextragear-2/kst/kst/kstlabel.h #1.16:1.17
@@ -74,4 +74,5 @@ public:
QRegion extents;
+ int v_offset;
private:
--- kdeextragear-2/kst/kst/kstview.cpp #1.69:1.70
@@ -468,12 +468,12 @@ void KstView::mouseMoveEvent(QMouseEvent
QRect rectBounding = oldExtents.boundingRect( );
- { // Scope is needed to kill off the painter before we resize
+ { // Scope is needed to kill off painter before we resize
QPainter p(&pm);
p.setBackgroundColor(KstSettings::globalSettings()->backgroundColor);
- label->draw(p, 0, rectBounding.height(), false);
+ label->draw(p, 0, label->v_offset, false);
}
//
- // do not allow `the pixmap to be increased in size, else we will be
+ // do not allow the pixmap to be increased in size, else we will be
// drawing a partially uninitialised pixmap during the drag operation...
//
More information about the Kst
mailing list