[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    kurllabel.patch
From:       Jarosław_Staniek <js () iidea ! pl>
Date:       2006-01-31 21:57:05
Message-ID: 43DFDD31.4020508 () iidea ! pl
[Download RAW message or body]

Stephan,
This is a fix (attached) for apps that set fixed size policy for KURLLabel and 
expect the margin to be 0. The only one known for me now is Konqueror, however.

OK?

-- 
regards / pozdrawiam,
  Jaroslaw Staniek / OpenOffice Polska

  Kexi Developer:      http://www.kexi-project.org | http://koffice.org/kexi
  Kexi Support:        http://www.kexi-project.org/support.html
  Kexi For MS Windows: http://kexi.pl/wiki/index.php/Kexi_for_MS_Windows
  KDE3, KDE4 Libraries For Developing MS Windows Applications:
                       http://www.kdelibs.com/wiki

["kurllabel.patch" (text/plain)]

Index: kurllabel.cpp
===================================================================
--- kurllabel.cpp	(revision 504367)
+++ kurllabel.cpp	(working copy)
@@ -434,6 +434,14 @@
 	}
 }
 
+void KURLLabel::setSizePolicy ( QSizePolicy policy )
+{
+	QLabel::setSizePolicy(policy);
+	if (!d->MarginAltered && policy.horData()==QSizePolicy::Fixed && \
policy.verData()==QSizePolicy::Fixed) { +		QLabel::setMargin(0); //better default : \
better look when fixed size +	}
+}
+
 void KURLLabel::virtual_hook( int, void* )
 { /*BASE::virtual_hook( id, data );*/ }
 
Index: kurllabel.h
===================================================================
--- kurllabel.h	(revision 504367)
+++ kurllabel.h	(working copy)
@@ -163,6 +163,11 @@
    */
   virtual void setFocusPolicy ( FocusPolicy policy );
 
+  /**
+   * Reimplemented for internal reasons, the API is not affected.
+   */
+  virtual void setSizePolicy ( QSizePolicy );
+
 public slots:
   /**
    * Turns on or off the underlining.



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic