summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-10 09:13:29 (UTC)
committer zautrix <zautrix>2005-03-10 09:13:29 (UTC)
commit4b05d69b961309df5d56714889c62ca530580914 (patch) (side-by-side diff)
treec6b7b0651889a88ffe44c570f7e557523cfa1044
parentf20f8ca063abd322387a72f3f5a65c480f6a4233 (diff)
downloadkdepimpi-4b05d69b961309df5d56714889c62ca530580914.zip
kdepimpi-4b05d69b961309df5d56714889c62ca530580914.tar.gz
kdepimpi-4b05d69b961309df5d56714889c62ca530580914.tar.bz2
pwmp fix
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt1
-rw-r--r--pwmanager/pwmanager/pwm.cpp13
2 files changed, 13 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index a7b8530..d4b7971 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -9,2 +9,3 @@ Added keyboard shorcuts for
- add new item ( i + n key)
+Fixed length of info in the title.
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index a751fce..9c8d12d 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -491,3 +491,14 @@ void PwM::updateCaption()
{
- setPlainCaption(curDoc()->getTitle() + " - " PROG_NAME " " PACKAGE_VER);
+ QString s = curDoc()->getTitle();
+ int maxlen = 50;
+ if ( QApplication::desktop()->width() < 640 ) {
+ if ( QApplication::desktop()->width() < 320 )
+ maxlen = 22;
+ else
+ maxlen = 35;
+ }
+ if ( s.length() > maxlen ) {
+ s = "..."+s.right(maxlen -3);
+ }
+ setPlainCaption( s );
}