PR# 13301 EV_BUTTON now resizes narrower than text - change from 5.7

Problem Report Summary
Submitter: prestoat2000
Category: EiffelVision
Priority: Medium
Date: 2007/07/12
Class: Support
Severity: Serious
Number: 13301
Release: 6.0.69141
Confidential: No
Status: Closed
Responsible:
Environment: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.8.0.7) Gecko/20060915 Firefox/1.5.0.7 Solaris 9 on SPARC
Synopsis: EV_BUTTON now resizes narrower than text - change from 5.7

Description
My application has a number of EV_BUTTON objects in the upper toolbar of
an EV_TITLED_WINDOW.  The buttons are created via a call to
`make_with_text_and_action', then added to a horizontal box and
`disable_item_expand' is called on each one.  There is no explicit
setting of minimum size.

In 5.7, these buttons won't resize narrower and their width seems to be
determined by the text for the button.  This means that when I try to
resize the containing window narrower, it won't resize narrower and the
text on every button in the window's upper toolbar remains visible.

In 6.0, I can resize the window narrower.  Some of the buttons get
resized narrower, so that not all of their text is visible and it looks
very confusing.  I would like to preserve the behavior of 5.7 when
we switch to Eiffel 6.0 or 6.1.

My first inclination was to call `set_minimum_size' or `set_minimum_width'
on these buttons but I don't know how to determine what values I should
pass to these routines.

Any suggestions on how to compute these values (or any other ways to
achieve what I want)?




To Reproduce

										
Problem Report Interactions
From:misterieking    Date:2007/07/18    Status: Closed    Download   
This is now fixed, just waiting for the patch to be integrated with the 6.0 branch, thanks for the report.

From:prestoat2000    Date:2007/07/13    Download   
Yes, I can reproduce it (took some work to narrow it down).  Problem
seems to only occur when I call {EV_TITLED_WINDOW}.enable_user_resize.

To reproduce:
Compile with attached classes and .ecf file.  With 5.7, window resizes
to accomodate buttons in upper bar of window and cannot be resized
smaller.  With 6.0, window does not resize wider to accomodate buttons.
Window can be any width and buttons are "squished" together and end
up overlapping each other.

Please fix if this is a bug or tell me how to work around it.

Attachment: test.e     Size:285
Attachment: my_window.e     Size:2186
Attachment: test.ecf     Size:1355
From:misterieking    Date:2007/07/12    Status: Analyzed    Download   
Hi David,

Are you able to send a reproducible for this problem?  There shouldn't be a change of behavior in this respect and should be the same as 5.7.