summaryrefslogtreecommitdiffstats
path: root/opensuse/core/tqt3/0055-qtextedit_zoom.patch
diff options
context:
space:
mode:
authorRobert Xu <robxu9@gmail.com>2012-07-28 17:22:06 -0400
committerRobert Xu <robxu9@gmail.com>2012-07-28 17:22:06 -0400
commit44279fd56aa28d4943b49e516ac791900c561488 (patch)
tree11289e75f32c5324c5f7469141881720af4f57fe /opensuse/core/tqt3/0055-qtextedit_zoom.patch
parent48e7f603b222a82ae22d94ecbd6cbba914144f86 (diff)
downloadtde-packaging-44279fd56aa28d4943b49e516ac791900c561488.tar.gz
tde-packaging-44279fd56aa28d4943b49e516ac791900c561488.zip
initial package (failing) of tqt3 for SuSE12.1
Diffstat (limited to 'opensuse/core/tqt3/0055-qtextedit_zoom.patch')
-rw-r--r--opensuse/core/tqt3/0055-qtextedit_zoom.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/opensuse/core/tqt3/0055-qtextedit_zoom.patch b/opensuse/core/tqt3/0055-qtextedit_zoom.patch
new file mode 100644
index 000000000..673393d45
--- /dev/null
+++ b/opensuse/core/tqt3/0055-qtextedit_zoom.patch
@@ -0,0 +1,39 @@
+qt-bugs@ issue :
+bugs.kde.org number :
+applied: yes
+author: Waldo Bastian <bastian@kde.org>
+
+QTextEdit::zoomIn /QTextEdit::zoomOut does not work if the original
+font had its size specified in pixels instead of points.
+pointSize() returns 0 in such case.
+
+Index: src/widgets/qtextedit.cpp
+===================================================================
+--- src/widgets/qtextedit.cpp.orig
++++ src/widgets/qtextedit.cpp
+@@ -5774,7 +5774,11 @@ void TQTextEdit::setFont( const TQFont &
+ 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 +5793,11 @@ 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 );
+ }
+