From 86704160817aedc391ac16199b9fd1feec880a7f Mon Sep 17 00:00:00 2001 From: josef Date: Sat, 26 Oct 2002 13:59:17 +0000 Subject: - handle no vscrollbar and vscrollbar on left side (hopefully) - when changing word wrap, reset widget automatically --- (limited to 'noncore/apps/opie-console') 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 @@ -1175,6 +1175,8 @@ void TEWidget::calcGeometry() columns = ( contentsRect().width() - 2 * rimX ) / font_w; if(vcolumns) columns = vcolumns; blX = (contentsRect().width() - (columns*font_w) ) / 2; + if(showhscrollbar) + blX = -hposition * font_w; brX = blX; scrollbar->hide(); break; @@ -1182,6 +1184,8 @@ void TEWidget::calcGeometry() columns = ( contentsRect().width() - 2 * rimX - scrollbar->width()) / font_w; if(vcolumns) columns = vcolumns; brX = (contentsRect().width() - (columns*font_w) - scrollbar->width() ) / 2; + if(showhscrollbar) + brX = -hposition * font_w; blX = brX + scrollbar->width(); scrollbar->move(contentsRect().topLeft()); scrollbar->show(); @@ -1344,6 +1348,8 @@ QPushButton* TEWidget::cornerButton() { void TEWidget::setWrapAt(int columns) { vcolumns = columns; + propagateSize(); + update(); } -- cgit v0.9.0.2