Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2
qt3-extensions
0055-qtextedit_zoom.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0055-qtextedit_zoom.patch of Package qt3-extensions
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 @@ -5767,7 +5767,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 ); } @@ -5782,7 +5786,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 ); }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor