summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/TEWidget.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/noncore/apps/opie-console/TEWidget.cpp b/noncore/apps/opie-console/TEWidget.cpp
index bf9a313..2db214c 100644
--- a/noncore/apps/opie-console/TEWidget.cpp
+++ b/noncore/apps/opie-console/TEWidget.cpp
@@ -1170,23 +1170,27 @@ void TEWidget::calcGeometry()
1170 else hscrollbar->hide(); 1170 else hscrollbar->hide();
1171 1171
1172 switch(scrollLoc) 1172 switch(scrollLoc)
1173 { 1173 {
1174 case SCRNONE : 1174 case SCRNONE :
1175 columns = ( contentsRect().width() - 2 * rimX ) / font_w; 1175 columns = ( contentsRect().width() - 2 * rimX ) / font_w;
1176 if(vcolumns) columns = vcolumns; 1176 if(vcolumns) columns = vcolumns;
1177 blX = (contentsRect().width() - (columns*font_w) ) / 2; 1177 blX = (contentsRect().width() - (columns*font_w) ) / 2;
1178 if(showhscrollbar)
1179 blX = -hposition * font_w;
1178 brX = blX; 1180 brX = blX;
1179 scrollbar->hide(); 1181 scrollbar->hide();
1180 break; 1182 break;
1181 case SCRLEFT : 1183 case SCRLEFT :
1182 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; 1184 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w;
1183 if(vcolumns) columns = vcolumns; 1185 if(vcolumns) columns = vcolumns;
1184 brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; 1186 brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2;
1187 if(showhscrollbar)
1188 brX = -hposition * font_w;
1185 blX = brX + scrollbar->width(); 1189 blX = brX + scrollbar->width();
1186 scrollbar->move(contentsRect().topLeft()); 1190 scrollbar->move(contentsRect().topLeft());
1187 scrollbar->show(); 1191 scrollbar->show();
1188 break; 1192 break;
1189 case SCRRIGHT: 1193 case SCRRIGHT:
1190 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; 1194 columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w;
1191 if(vcolumns) columns = vcolumns; 1195 if(vcolumns) columns = vcolumns;
1192 blX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; 1196 blX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2;
@@ -1339,11 +1343,13 @@ void TEWidget::drop_menu_activated(int)
1339 1343
1340QPushButton* TEWidget::cornerButton() { 1344QPushButton* TEWidget::cornerButton() {
1341 return m_cornerButton; 1345 return m_cornerButton;
1342} 1346}
1343 1347
1344void TEWidget::setWrapAt(int columns) 1348void TEWidget::setWrapAt(int columns)
1345{ 1349{
1346 vcolumns = columns; 1350 vcolumns = columns;
1351 propagateSize();
1352 update();
1347} 1353}
1348 1354
1349 1355