[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-pim
Subject: [Kde-pim] [patch]navbar month-label was too small
From: Martin Koller <m.koller () surfeu ! at>
Date: 2003-12-29 18:20:12
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi list,
have seen that this patch was not applied until now, so the problem still
exists.
Can you apply the patch, please?
Thanks.
- ---------- Forwarded Message ----------
Subject: [Kde-pim] [patch]navbar month-label was too small
Date: Sunday 30 November 2003 18:57
From: Martin Koller <m.koller@surfeu.at>
To: kde-pim@mail.kde.org
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
I've seen that the month-label showing month+year in the navbar was too small
to hold some large month names (e.g. November, September).
I created a patch, which now calculates the width using QFontMetrics instead
of asking the label itself for the width, and this in fact gives a different
value, which is now correct.
- --
Best regards/Schöne Grüße
Martin
registered as user #332716 with the Linux Counter, http://counter.li.org
Some operating systems are called 'user friendly',
Linux however is 'expert friendly'.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE/8HBfHmdPoI37D4YRAvXwAKCSevercB//i6s9QdCIQztCIXTbeACeNf6X
PbW+kV0WKKcP3buEmuFoV5A=
=xJtD
-----END PGP SIGNATURE-----
["navbar.patch" (text/x-diff)]
? navbar.patch
Index: navigatorbar.cpp
===================================================================
RCS file: /home/kde/kdepim/korganizer/navigatorbar.cpp,v
retrieving revision 1.9
diff -u -3 -p -r1.9 navigatorbar.cpp
--- navigatorbar.cpp 4 Oct 2003 16:04:43 -0000 1.9
+++ navigatorbar.cpp 30 Nov 2003 17:52:53 -0000
@@ -86,8 +86,8 @@ NavigatorBar::NavigatorBar( const QDate
const KCalendarSystem *calSys = KOGlobals::self()->calendarSystem();
for( i = 1; i <= calSys->monthsInYear(date); ++i ) {
- mMonth->setText( QString("%1 8888").arg(calSys->monthName( i, calSys->year(date) \
)) );
- if ( mMonth->width() > maxwidth ) maxwidth = mMonth->width();
+ int w = QFontMetrics(tfont).width( QString("%1 8888").arg(calSys->monthName( i, \
calSys->year(date) )) ); + if ( w > maxwidth ) maxwidth = w;
}
mMonth->setMinimumWidth( maxwidth );
_______________________________________________
kde-pim mailing list
kde-pim@mail.kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
kde-pim home page at http://pim.kde.org/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic