Bug 157182 - Make the logout dialog autofit for long usernames
Summary: Make the logout dialog autofit for long usernames
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Urs Wolfer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-05 02:22 UTC by Elias Probst
Modified: 2008-03-02 15:54 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Elias Probst 2008-02-05 02:22:19 UTC
Version:            (using Devel)
Installed from:    Compiled sources

When having a long username, the logout dialog currently looks like this:
http://eliasprobst.eu/~elias/stuff/screenshots/kde4-issues/plasma/logout-dialog-long-username.png
The username is wrapped at the end which IMHO looks quite ugly.

logoutMessageLabel->setWordWrap(true); to 'false' fixes this, but now the logout dialog looks like this:
http://eliasprobst.eu/~elias/stuff/screenshots/kde4-issues/plasma/logout-stretched-moon.png

The problem is: the moon + the whole background of this dialog are just an bitmap (PNG) which is embedded into an SVG (http://websvn.kde.org/trunk/KDE/kdebase/workspace/plasma/desktoptheme/dialogs/shutdowndialog.svg?view=log)file.

To make this work, the background + the moon image need to be handled as separate objects in the QLayout.

Will try to provide a fix tomorrow.

Regards, Elias P.
Comment 1 Urs Wolfer 2008-02-05 19:37:38 UTC
Please do not create a new layout. The idea behind this change is, that this dialog is fully themeable. If you put the parts in a different layouts, this possibility will go away.
And this workaround with the prerendered SVG is just here because the SVG renderer in Qt 4.3 is not able to render this graphic correctely. Hopefully this will change soon.
I would rather prefer to squeeze the text if it is too long than creating a new layout.

Comments?
Comment 2 Elias Probst 2008-02-05 23:15:06 UTC
As discussed on IRC, not that much will be changed here due to (hopefully) upcoming improvements of Qt's SVG renderer.

The only thing which will be done now: Squeezing long usernames like:
"John who is named after his father John" → "John who is na..."

Maybe the end of the string could be faded out subtile like it's done in some other KDE apps too.

Regards, Elias P.
Comment 3 Urs Wolfer 2008-03-02 15:54:52 UTC
SVN commit 781298 by uwolfer:

* When opening logout dialog from kickoff, an action is already pre-selected. If the user does not do anything, the action will be executed automatically after 60 seconds. i18n stuff reviewed by Chusslove.
* Fix issue with recent Qt 4.4 snapshot: use QPalette for text color instead of HTML
* Fix issue with very long user names: cut them off if they would require more than two lines #157182
* Fix some krazy issues

BUG:157182

 M  +4 -7      server.cpp  
 M  +59 -7     shutdowndlg.cpp  
 M  +6 -0      shutdowndlg.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=781298