summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/qtextedit.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/widgets/qtextedit.cpp b/src/widgets/qtextedit.cpp
index 9507d4f08..67703f342 100644
--- a/src/widgets/qtextedit.cpp
+++ b/src/widgets/qtextedit.cpp
@@ -5774,7 +5774,12 @@ void TQTextEdit::setFont( const TQFont &f )
void TQTextEdit::zoomIn( int range )
{
TQFont f( TQScrollView::font() );
- f.setPointSize( TQFontInfo(f).pointSize() + range );
+ TQFontInfo fi(f);
+ if (fi.pointSize() <= 0) {
+ f.setPixelSize( fi.pixelSize() + range );
+ } else {
+ f.setPointSize( fi.pointSize() + range );
+ }
setFont( f );
}
@@ -5789,7 +5794,12 @@ void TQTextEdit::zoomIn( int range )
void TQTextEdit::zoomOut( int range )
{
TQFont f( TQScrollView::font() );
- f.setPointSize( TQMAX( 1, TQFontInfo(f).pointSize() - range ) );
+ TQFontInfo fi(f);
+ if (fi.pointSize() <= 0) {
+ f.setPixelSize( TQMAX( 1, fi.pixelSize() - range ) );
+ } else {
+ f.setPointSize( TQMAX( 1, fi.pointSize() - range ) );
+ }
setFont( f );
}