[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Tue May 11 01:38:16 CEST 2004
CVS commit by arwalker:
Move the focus rect and selection rect inside of the contents rect.
This allows us to the focus/selection even when the plot is the full size of the window
or is one plot arranged on a uniform grid.
M +2 -2 kst2dplot.cpp 1.13
M +4 -4 kstborderedviewobject.cpp 1.11
M +8 -8 kstviewobject.cpp 1.38
--- kdeextragear-2/kst/kst/kstviewobject.cpp #1.37:1.38
@@ -103,8 +103,8 @@ void KstViewObject::drawFocusRect(QPaint
p.setPen(pen);
QRect r;
- r.setX(_geom.left() - 3);
- r.setY(_geom.top() - 3);
- r.setWidth(_geom.width() + 6);
- r.setHeight(_geom.height() + 6);
+ r.setX(_geom.left());
+ r.setY(_geom.top());
+ r.setWidth(_geom.width());
+ r.setHeight(_geom.height());
Qt::RasterOp op = p.rasterOp();
p.setRasterOp(Qt::NotROP);
@@ -118,8 +118,8 @@ void KstViewObject::drawSelectRect(QPain
p.setPen(pen);
QRect r;
- r.setX(_geom.left() - 1);
- r.setY(_geom.top() - 1);
- r.setWidth(_geom.width() + 2);
- r.setHeight(_geom.height() + 2);
+ r.setX(_geom.left() + 2);
+ r.setY(_geom.top() + 2);
+ r.setWidth(_geom.width() - 4);
+ r.setHeight(_geom.height() - 4);
Qt::RasterOp op = p.rasterOp();
p.setRasterOp(Qt::CopyROP);
--- kdeextragear-2/kst/kst/kstborderedviewobject.cpp #1.10:1.11
@@ -45,10 +45,10 @@ void KstBorderedViewObject::save(QTextSt
void KstBorderedViewObject::paint(QPainter& p) {
if (_borderWidth > 0) {
- QPoint pos = _geom.topLeft();
+ QRect r;
QPen pen(_borderColor, _borderWidth);
+
p.setPen(pen);
- QRect r;
- r.setX(pos.x() + _margin);
- r.setY(pos.y() + _margin);
+ r.setX(_geom.left() + _margin);
+ r.setY(_geom.top() + _margin);
r.setWidth(_geom.width() - 2 * _margin);
r.setHeight(_geom.height() - 2 * _margin);
--- kdeextragear-2/kst/kst/kst2dplot.cpp #1.12:1.13
@@ -812,6 +812,4 @@ void Kst2DPlot::paint(QPainter& p) {
void Kst2DPlot::paint(QPainter& p, double in_xleft_bdr_px) {
- KstPlotBase::paint(p);
-
double XTick, YTick, Xorg, Yorg; // Tick interval and position
double x_min, x_max, y_min, y_max;
@@ -1375,4 +1373,6 @@ void Kst2DPlot::paint(QPainter& p, doubl
p.restore();
+
+ KstPlotBase::paint(p);
}
More information about the Kst
mailing list