Fwd: [PATCH] khtmlview.cpp
David Faure
faure at kde.org
Tue Oct 22 09:17:09 BST 2002
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
This patch prevents tooltips from being very very wide, as on tomshardware.com
- ---------- Forwarded Message ----------
Subject: [PATCH] khtmlview.cpp
Date: Tuesday 22 October 2002 06:52
From: Pascal Létourneau <pletourn at globetrotter.net>
To: faure at kde.org
Salut
Évite que les tooltips s'étirent en longueur... (comme sur tomshardware.com)
Je commite?
Pascal Létourneau
Index: khtmlview.cpp
===================================================================
RCS file: /home/kde/kdelibs/khtml/khtmlview.cpp,v
retrieving revision 1.491
diff -u -3 -p -r1.491 khtmlview.cpp
- --- khtmlview.cpp 2002/10/20 23:09:14 1.491
+++ khtmlview.cpp 2002/10/22 04:46:31
@@ -239,8 +239,12 @@ void KHTMLToolTip::maybeTip(const QPoint
if ( node->isElementNode() ) {
QString s = static_cast<DOM::ElementImpl*>( node )->getAttribute( ATTR_TITLE ).string();
region |= QRect( m_view->contentsToViewport( node->getRect().topLeft() ), node->getRect().size() );
- - if ( !s.isEmpty() ) {
- - tip( region, s );
+ if ( !s.isEmpty() ) {
+ if ( s.length() > 50 ) {
+ s.replace( "\n" , "<br>" );
+ s.prepend("<qt>");
+ }
+ tip( region, s );
break;
}
}
- -------------------------------------------------------
- --
David FAURE, david at mandrakesoft.com, faure at kde.org
http://people.mandrakesoft.com/~david/
Contributing to: http://www.konqueror.org/, http://www.koffice.org/
Get the latest KOffice - http://download.kde.org/stable/koffice-1.2/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9tQmw72KcVAmwbhARAmQGAJ4oWNWb/45xS1zeTjOVtgrm/VXhAACfezzw
BXslLgXhR9sWJX4qd+SN/Ag=
=EA1m
-----END PGP SIGNATURE-----
More information about the kfm-devel
mailing list