summaryrefslogtreecommitdiffabout
Side-by-side diff
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
@@ -4,12 +4,13 @@ Info about the changes in new versions of KDE-Pim/Pi
PwM/Pi:
Added keyboard shorcuts for
- toggling summary view (space bar)
- delete item (delete + backspace key)
- add new item ( i + n key)
+Fixed length of info in the title.
KO/Pi-KA/Pi:
Changed "ME" menu bar entry to an icon.
KO/Pi:
Fixed two minor bugs in displaying todos.
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
@@ -486,13 +486,24 @@ void PwM::initMetrics()
else
resize(DEFAULT_SIZE);
}
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 );
}
void PwM::hideEvent(QHideEvent *)
{
if (isMinimized()) {
if (init->tray()) {