[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Tue Apr 6 18:54:50 CEST 2004
CVS commit by staikos:
Well it was too difficult to use "math" coordinates. I was confusing myself
endlessly. Let's go back to u-l. This makes cleanup work properly. Now all
features implemented so far are working.
M +3 -3 kstborderedviewobject.h 1.5
M +1 -0 ksttoplevelview.cpp 1.8
M +6 -6 kstviewobject.cpp 1.10
--- kdeextragear-2/kst/kst/kstborderedviewobject.h #1.4:1.5
@@ -25,6 +25,5 @@
/***************************************************************************
- |<----------------------- Width ----------------------->|
-
+ (position().x(), position().y())
+-------------------------------------------------------+ ---
| Margin | ^
@@ -44,5 +43,6 @@
| | V
+-------------------------------------------------------+ ---
- (position().x(), position().y())
+
+ |<----------------------- Width ----------------------->|
--- kdeextragear-2/kst/kst/ksttoplevelview.cpp #1.7:1.8
@@ -72,4 +72,5 @@ void KstTopLevelView::paint(bool erase)
QPainter p;
p.begin(_w);
+ p.setViewXForm(true);
paint(p);
p.end();
--- kdeextragear-2/kst/kst/kstviewobject.cpp #1.9:1.10
@@ -79,8 +79,8 @@ void KstViewObject::paint(QPainter& p) {
p.setPen(pen);
QRect r;
- r.setX(_pos.x() - 4);
- r.setY(_pos.y() - 4);
- r.setWidth(_size.width() + 8);
- r.setHeight(_size.height() + 8);
+ r.setX(_pos.x() - 1);
+ r.setY(_pos.y() - 1);
+ r.setWidth(_size.width() + 2);
+ r.setHeight(_size.height() + 2);
p.drawWinFocusRect(r);
}
@@ -194,5 +194,5 @@ void KstViewObject::cleanup(int cols) {
int pos = 0;
int x = 0;
- int y = _size.height() - 1;
+ int y = 0;
int w = _size.width() / cols;
int lastRow = _children.count() / cols;
@@ -217,5 +217,5 @@ void KstViewObject::cleanup(int cols) {
if (++pos % cols == 0) {
x = 0;
- y -= h;
+ y += h;
} else {
x += w;
More information about the Kst
mailing list