-rw-r--r-- | noncore/apps/opie-console/TEWidget.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp index 2db214c..d1ff85e 100644 --- a/noncore/apps/opie-console/TEWidget.cpp +++ b/noncore/apps/opie-console/TEWidget.cpp | |||
@@ -1153,16 +1153,20 @@ void TEWidget::calcGeometry() | |||
1153 | int hwidth = 0; | 1153 | int hwidth = 0; |
1154 | 1154 | ||
1155 | if(vcolumns == 0) showhscrollbar = 0; | 1155 | if(vcolumns == 0) showhscrollbar = 0; |
1156 | if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); | 1156 | if(showhscrollbar == 1) hwidth = QApplication::style().scrollBarExtent().width(); |
1157 | 1157 | ||
1158 | scrollbar->resize(QApplication::style().scrollBarExtent().width(), | 1158 | scrollbar->resize(QApplication::style().scrollBarExtent().width(), |
1159 | contentsRect().height() - hwidth); | 1159 | contentsRect().height() - hwidth); |
1160 | 1160 | ||
1161 | if(!showhscrollbar) cornerButton()->move(0, 0); | ||
1162 | else cornerButton()->move(contentsRect().width() - hwidth, contentsRect().height() - hwidth); | ||
1163 | |||
1164 | |||
1161 | if(showhscrollbar == 1) | 1165 | if(showhscrollbar == 1) |
1162 | { | 1166 | { |
1163 | hscrollbar->resize(contentsRect().width() - hwidth, hwidth); | 1167 | hscrollbar->resize(contentsRect().width() - hwidth, hwidth); |
1164 | hscrollbar->setRange(0, 40); | 1168 | hscrollbar->setRange(0, 40); |
1165 | 1169 | ||
1166 | QPoint p = contentsRect().bottomLeft(); | 1170 | QPoint p = contentsRect().bottomLeft(); |
1167 | hscrollbar->move(QPoint(p.x(), p.y() - hwidth)); | 1171 | hscrollbar->move(QPoint(p.x(), p.y() - hwidth)); |
1168 | hscrollbar->show(); | 1172 | hscrollbar->show(); |
@@ -1202,18 +1206,18 @@ void TEWidget::calcGeometry() | |||
1202 | break; | 1206 | break; |
1203 | } | 1207 | } |
1204 | //FIXME: support 'rounding' styles | 1208 | //FIXME: support 'rounding' styles |
1205 | lines = ( contentsRect().height() - 2 * rimY ) / font_h; | 1209 | lines = ( contentsRect().height() - 2 * rimY ) / font_h; |
1206 | bY = (contentsRect().height() - (lines *font_h)) / 2; | 1210 | bY = (contentsRect().height() - (lines *font_h)) / 2; |
1207 | 1211 | ||
1208 | if(showhscrollbar == 1) | 1212 | if(showhscrollbar == 1) |
1209 | { | 1213 | { |
1210 | //bY = bY - 10; | 1214 | lines = lines - (hwidth / font_h) - 1; |
1211 | lines = lines - 1; | 1215 | if(lines < 1) lines = 1; |
1212 | } | 1216 | } |
1213 | } | 1217 | } |
1214 | 1218 | ||
1215 | void TEWidget::makeImage() | 1219 | void TEWidget::makeImage() |
1216 | //FIXME: rename 'calcGeometry? | 1220 | //FIXME: rename 'calcGeometry? |
1217 | { | 1221 | { |
1218 | calcGeometry(); | 1222 | calcGeometry(); |
1219 | image = (ca*) malloc(lines*columns*sizeof(ca)); | 1223 | image = (ca*) malloc(lines*columns*sizeof(ca)); |