PR# 19319 untitled dialogs failing to size itself correctly to accommodate box container item
Problem Report Summary
Submitter: finnianr
Category: EiffelVision
Priority: Medium
Date: 2017/01/29
Class: Bug
Severity: Non-critical
Number: 19319
Release: 16.05.9.8969
Confidential: No
Status: Open
Responsible: manus_eiffel
Environment: Windows 7, SDK 7.1
Synopsis: untitled dialogs failing to size itself correctly to accommodate box container item
Description
If you add a vertical box to an untitled dialog during initialization, the dialog is failing to adapt to the natural size of the box item. This results in the box border being massively over extended on the bottom edge. The GTK implementation is unaffected by this bug. I only started noticing this problem since I upgraded from version 15.01 so it's possible that it is a regression bug This might affect titled dialogs as well but I haven't tested. So far I have not managed to find a workaround to this problem.
To Reproduce
the attached project reproduces the problem.
Problem Report Interactions
CORRECTION Actually I got that wrong. It is not necessary to call `set_maximum_size' for a workaround. The following code prevents the problem from happening. create dialog box := new_border_box dialog.disable_border dialog.disable_user_resize dialog.put (box) Ah, I recently changed the order of the call to `disable_user_resize' in my application-wide parent dialog. This must why I am getting this problem now. So it was probably there in 15.01 too. But in any case, there is inconsistent behavior with GTK so it must be regarded as a bug
I found adding a call to `set_maximum_size ' and `disable_user_resize' before adding the container fixes the problem, but I think you will agree with me that it shouldn't be necessary to do that. Note that just using a call to `set_maximum_height' will not work. box := new_border_box dialog.set_maximum_size (box.width, box.height) dialog.disable_user_resize dialog.put (box)
I thought setting the maximum size of the dialog before adding the box container might provide a workaround, but it doesn't