[PATCH] Rename dialog is too big (or too narrow)

Andras Mantia amantia at kde.org
Tue Jan 22 15:20:23 GMT 2008

On Tuesday 22 January 2008, David Faure wrote:
> Then it should have a sizeHint that is "the size of the full text",
> but limited to a reasonable value so that the dialog isn't bigger
> than the screen. (and a minimumSizeHint that is "the size of the
> squeezed text", or even "the size of the text when squeezed the
> most", actually).
> After all that definition of the sizeHint is what we want, no?
> To squeeze the text only so that it fits into the screen, not to
> squeeze it as much as possible...

I tried something similar as well (set the full text on creation and let 
sizeHint return what a QLabel would return for that text) and while it 
worked for renamedialog, with the audio plugin there was an interesting 
effect: the label was visibly resized until you ended up with "...". :) 
But I will try as you said, to return in the sizehint a maximum possible 
value (the value of the full text or the screensize minus something). 
But here there could be another issue:
- the squeezedlabel is added to a dialog
- the dialog has some other widgets near the squeezedlabel
- the squeezedlabel has a large text, but uses the full text, because it 
would fit on the screen
- the dialog will not fit on the screen,  because there is another 
widget near the label.

So I think providing a maximum value that can be controlled by the user 
of the class makes sense.


Quanta Plus developer - http://quanta.kdewebdev.org
K Desktop Environment - http://www.kde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080122/5c7aa778/attachment.sig>

More information about the kde-core-devel mailing list