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

List:       kde-core-devel
Subject:    A patch for kde-3.0.2 + qt-3.0.5
From:       Laurent Montel <lmontel () mandrakesoft ! com>
Date:       2002-08-02 8:11:56
[Download RAW message or body]

Hi,
When I recompiled kde 3.0.2 with qt-3.0.5, I saw that ktip was too big.
So I found that it was text of label which created problem :
i18n("Did you know...?\n");
and when I removed "\n" at the end I fixe problem.

So I created a little  patch to fix it.

I don't break i18n.

I don't know if there is this problem with kde3.1 but in kde3.0.2, there is a 
bug.

What do you think about my patch.
Can I commit it into kde3.0 branch ?

Regards.
["kdelibs-3.0.2-fix-ktip-too-big-with-qt-305.patch" (text/x-diff)]

--- kdelibs-3.0.2/kdeui/ktip.cpp--	2002-08-02 10:00:56.000000000 +0200
+++ kdelibs-3.0.2/kdeui/ktip.cpp	2002-08-02 10:03:42.000000000 +0200
@@ -146,7 +146,15 @@ KTipDialog::KTipDialog(KTipDatabase *db,
 
   QLabel *titlePane = new QLabel(this);
   titlePane->setBackgroundPixmap(locate("data", "kdeui/pics/ktip-background.png"));
-  titlePane->setText(i18n("Did you know...?\n"));
+  QString text = i18n("Did you know...?\n");
+#if QT_VERSION > 304
+  int pos = text.find( "\n" );
+  if( pos != -1 )
+    text.remove(pos, QString("\n").length() );
+#endif
+  titlePane->setText(text);
+
+
   titlePane->setFont(QFont(KGlobalSettings::generalFont().family(), 20,  QFont::Bold));
   titlePane->setAlignment(QLabel::AlignCenter);
   hbox->addWidget(titlePane,100);
@@ -177,6 +185,9 @@ KTipDialog::KTipDialog(KTipDatabase *db,
 
   KConfigGroup config(KGlobal::config(), "TipOfDay");
   _tipOnStart->setChecked(config.readBoolEntry("RunOnStart", true));
+#if QT_VERSION > 304
+  resize( 530, 230 );
+#endif
 }
 
 


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

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