summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp26
1 files changed, 15 insertions, 11 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index 1c83710..3d010cb 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -1154,2 +1154,3 @@ void TEWidget::calcGeometry()
int hwidth = 0;
+ int dcolumns;
@@ -1165,13 +1166,2 @@ void TEWidget::calcGeometry()
- if(showhscrollbar == 1)
- {
- hscrollbar->resize(contentsRect().width() - hwidth, hwidth);
- hscrollbar->setRange(0, 40);
-
- QPoint p = contentsRect().bottomLeft();
- hscrollbar->move(QPoint(p.x(), p.y() - hwidth));
- hscrollbar->show();
- }
- else hscrollbar->hide();
-
switch(scrollLoc)
@@ -1180,2 +1170,3 @@ void TEWidget::calcGeometry()
columns = ( contentsRect().width() - 2 * rimX ) / font_w;
+ dcolumns = columns;
if(vcolumns) columns = vcolumns;
@@ -1189,2 +1180,3 @@ void TEWidget::calcGeometry()
columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w;
+ dcolumns = columns;
if(vcolumns) columns = vcolumns;
@@ -1199,2 +1191,3 @@ void TEWidget::calcGeometry()
columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w;
+ dcolumns = columns;
if(vcolumns) columns = vcolumns;
@@ -1214,2 +1207,13 @@ void TEWidget::calcGeometry()
{
+ hscrollbar->resize(contentsRect().width() - hwidth, hwidth);
+ hscrollbar->setRange(0, vcolumns - dcolumns);
+
+ QPoint p = contentsRect().bottomLeft();
+ hscrollbar->move(QPoint(p.x(), p.y() - hwidth));
+ hscrollbar->show();
+ }
+ else hscrollbar->hide();
+
+ if(showhscrollbar == 1)
+ {
lines = lines - (hwidth / font_h) - 1;