modalDialog: Request HEIGHT_FOR_WIDTH

All our modal dialogs are given a fixed width and grow vertically
as necessary. Set the request mode accordingly, so that wrapped
labels are considered correctly during size request, and not only
at allocation time (where they'll either take away from the padding
or even cause the dialog to overflow).

https://bugzilla.gnome.org/show_bug.cgi?id=704015
This commit is contained in:
Florian Müllner 2013-07-11 16:43:04 +02:00
parent 777189d7bd
commit 00ccbdaae9

View File

@ -79,6 +79,11 @@ const ModalDialog = new Lang.Class({
this.dialogLayout = new St.BoxLayout({ style_class: 'modal-dialog',
vertical: true });
// modal dialogs are fixed width and grow vertically; set the request
// mode accordingly so wrapped labels are handled correctly during
// size requests.
this.dialogLayout.request_mode = Clutter.RequestMode.HEIGHT_FOR_WIDTH;
if (params.styleClass != null)
this.dialogLayout.add_style_class_name(params.styleClass);