diff options
author | Robert Xu <rxu@linux-zdwj.site> | 2012-02-01 00:31:59 -0500 |
---|---|---|
committer | Robert Xu <rxu@linux-zdwj.site> | 2012-02-01 00:31:59 -0500 |
commit | f599f39717d771b8b7a2aff006cda6c31e8b12da (patch) | |
tree | f601e3c0303a193cda6f8c6f956619dda9673c70 /opensuse/core/qt3/0055-qtextedit_zoom.patch | |
parent | ead369ac94473139a2320a1c90cda64dd887b94a (diff) | |
parent | 27c9e783c6283f8916ebee3a23c6d1ba909a5126 (diff) | |
download | tde-packaging-f599f39717d771b8b7a2aff006cda6c31e8b12da.tar.gz tde-packaging-f599f39717d771b8b7a2aff006cda6c31e8b12da.zip |
Merge branch 'suse'
Diffstat (limited to 'opensuse/core/qt3/0055-qtextedit_zoom.patch')
-rw-r--r-- | opensuse/core/qt3/0055-qtextedit_zoom.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/opensuse/core/qt3/0055-qtextedit_zoom.patch b/opensuse/core/qt3/0055-qtextedit_zoom.patch new file mode 100644 index 000000000..38cdaa8a7 --- /dev/null +++ b/opensuse/core/qt3/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: widgets/qtextedit.cpp +================================================================================ +--- src/widgets/qtextedit.cpp ++++ src/widgets/qtextedit.cpp +@@ -5774,7 +5774,11 @@ + void QTextEdit::zoomIn( int range ) + { + QFont f( QScrollView::font() ); +- f.setPointSize( QFontInfo(f).pointSize() + range ); ++ QFontInfo fi(f); ++ if (fi.pointSize() <= 0) ++ f.setPixelSize( fi.pixelSize() + range ); ++ else ++ f.setPointSize( fi.pointSize() + range ); + setFont( f ); + } + +@@ -5789,7 +5793,11 @@ + void QTextEdit::zoomOut( int range ) + { + QFont f( QScrollView::font() ); +- f.setPointSize( QMAX( 1, QFontInfo(f).pointSize() - range ) ); ++ QFontInfo fi(f); ++ if (fi.pointSize() <= 0) ++ f.setPixelSize( QMAX( 1, fi.pixelSize() - range ) ); ++ else ++ f.setPointSize( QMAX( 1, fi.pointSize() - range ) ); + setFont( f ); + } + |