#293 closed bug (invalid)

Horizontal Group Has Content Partially Hidden in MUI v4, Not MUI v3.8a

Reported by: tygre Owned by:
Priority: normal Milestone: 4.0-2016R1
Component: Virtgroup.mui Version: 4.0-AmiKit8.2
Severity: minor Keywords:
Cc: OS Platform: AmigaOS3
Blocked By: Blocking:
Release Notes:

Description

Summary

The preferences page of AmiModRadio shows an HGroupV containing a Label2 and a TextObject. Under Workbench 3.1 and MUI v3.8, the height of this group is correct and the content of the HGroupV is shown entirely.

Under AmiKit 8.2 and MUI v4, the height of the group seems incorrect: the content of the HGroupV is partially hidden.

Steps to reproduce

Here is the code of the HGroupV, the complete source code is available at https://bitbucket.org/tygre/amimodradio/src/d96566b5ae399f7726c01e138c5eea3fa8c333c7/mui.c?fileviewer=file-view-default

Child, HGroupV,

Child, Label2("Saved modules directory:"),
Child, TextObject,

MUIA_HelpNode, "TX_label_modules",
MUIA_Background, MUII_TextBack,
MUIA_Frame, MUIV_Frame_Text,
MUIA_Text_Contents, prefs_get_saved_modules_directory(),
MUIA_Text_SetMin, TRUE,

End,

End,

Expected results

A screenshot of the expected results under both MUI v3.8 and MUI v4 is available at http://www.chingu.asia/wiki/userfiles/image/Programming/AmiModRadio/160301%20-%20Prefs%20v0.97%20MUI%20v3.8.png

Actual results

A screenshot of the results under MUI v4 is available at http://www.chingu.asia/wiki/userfiles/image/Programming/AmiModRadio/160301%20-%20Prefs%20v0.97%20MUI%20v4.png. Also, a movie showing that the content of the HGroupV can be shown using the mouse wheel is available at https://www.dropbox.com/s/cd3rawk2zrt1rla/2016-02-14%2000.18.10.mov?dl=0 (Jan Zahurancik's courtesy).

Regression

I would think so.

Notes

Maybe my code is responsible for the problem, please let me know!

PS. It seems that the problem comes from nesting virtual group (a HGroupV inside another VirtualGroup), I will test soon on Amikit…

Change History (4)

comment:1 Changed 22 months ago by Thore Böckelmann

Component: Group.muiVirtgroup.mui
Milestone: future release4.0-2016R1
Priority: undecidednormal

As stated here already the problem is that you are using a virtual group without the typical surrounding control group (i.e. a Scrollgroup object). The virtual group is allowed to adjust its size in both directions to the absolute minimum if required. And this is exactly what it happening here. The window is not high enough to show the virtual group's contents with their full height and hence makes it smaller. However, it is always possible to scroll the virtual group's contents with the mouse wheel whenever they are not fully visible.

The solution is quite simple: use a simple HGroup instead of HGroupV and don't set MUIA_Text_SetMin to TRUE. The latter will allow the Text object to shorten the displayed text if the window is too narrow to display the full text. A virtual group without a surrounding Scrollgroup object is simply the wrong thing to use in this situation. And placing everything inside a Scrollgroup object would be by far too much for a simple text label with unpredictable contents.

To make it short: the problem is not the fact that the virtual groups are nested, but simply that the inner virtual group is the wrong object type for the effect to be archived.

This is how your code should look like:

 Child, HGroup,

    Child, Label2("Saved modules directory:"),
    Child, TextObject,

        MUIA_HelpNode, "TX_label_modules",
        MUIA_Background, MUII_TextBack,
        MUIA_Frame, MUIV_Frame_Text,
        MUIA_Text_Contents, prefs_get_saved_modules_directory(),

    End,

End,

I cannot tell how MUI 3.8 did handle this situation, because we never had access to the old source code, and with MUI 3.9 things were already as they are now. Lots of things were different with MUI 3.8, but this does not mean that MUI 3.8 was better. In fact it is worse in lots of ways.

comment:2 Changed 22 months ago by tygre

Okay, thanks a lot for the explanations, I have changed my code and will test toomorrow!

comment:3 Changed 22 months ago by tygre

I'm happy to report that (1) replacing the HGroupV by HGroup and (2) removing entirely MUIA_Text_SetMin, TRUE solved the "problem". Now, on AmiKit v8.2 (with MUI v4) and my Classic (with MUI v3.8 ), the gadgets are displayed properly! Thanks for your help! :)

comment:4 Changed 22 months ago by Thore Böckelmann

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.