From kde-core-devel Fri Aug 02 08:11:56 2002 From: Laurent Montel Date: Fri, 02 Aug 2002 08:11:56 +0000 To: kde-core-devel Subject: A patch for kde-3.0.2 + qt-3.0.5 X-MARC-Message: https://marc.info/?l=kde-core-devel&m=102827610601874 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-00=_M7jS9+Ri9p+YIu8" --Boundary-00=_M7jS9+Ri9p+YIu8 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8bit Content-Disposition: inline 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. --Boundary-00=_M7jS9+Ri9p+YIu8 Content-Type: text/x-diff; charset="us-ascii"; name="kdelibs-3.0.2-fix-ktip-too-big-with-qt-305.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kdelibs-3.0.2-fix-ktip-too-big-with-qt-305.patch" --- 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 } --Boundary-00=_M7jS9+Ri9p+YIu8--