I hope you don't mind HTML email, but I want to be able to highlight
something below.  (I know some people hate HTML email)

OK, I found it.  The thing that made it so hard to find was that it computes
a left margin, but to save memory, stores it in kid_geometry->margin_top.

The fix to the problem is to change rcutils.c around 908 to...
   /* Note: margin_top is really left margin and is used to
    * line up menu items which have toggle buttons with
    * items that don't.
    */
    _XmConfigureObject(kid,
            kid_geometry->box.x + kid_geometry->margin_top,
            kid_geometry->box.y,
            kid_geometry->box.width + kid_geometry->margin_top,
            kid_geometry->box.height,
            kid_geometry->box.border_width);


Adding margin_top (which is really left margin) to the width seems counter-intuitive
to me, but without it, menu items which are pull-right don't line up correctly.  If this
ends up breaking anything else, it could probably be changed to only do it if the
RowColumn is a menu pane

----- Original Message -----
From: "Danny Backx" <[EMAIL PROTECTED]>
To: "Dave Williss" <[EMAIL PROTECTED]>
Cc: "LessTif Mailing List" <[EMAIL PROTECTED]>
Sent: Thursday, October 21, 2004 1:34 PM
Subject: Re: [Lesstif-discuss] label alignment on menus when toggles arepresent


> Dave,
>
> The code that moves the text is visible e.g. in the resize function
> in lib/Xm-2.1/ToggleB.c where Lab_TextRect_x(w) gets set.
>
> This really implies that the superclass (XmLabel) does all the work
> of drawing the text, and has sufficient support so XmToggleButton
> can get away with that; and Toggle only takes care of the position
> calculation and drawing the indicator.
>
> For your information, there's similar interaction between XmLabel
> and XmPushButton for accelerators. (There's no reason why XmLabel
> has accelerators except its subclasses.)
>
> If you want to start single-stepping this, be sure not to end up in
> a case where you freeze your whole screen. On my (linux) system, I
> would have to run this in an Xnest X server to prevent the grabs
> from blocking me; maybe this is different on your (windows?) system.
>
> Danny
>
> On Wed, 2004-10-20 at 22:46, Dave Williss wrote:
>> We've noticed an alignment problem on menu panes when some of the items on
>> the menu have toggle buttons.
>>
>> As these screen grabs shows some of the items have their margins set to
>> account for the toggles and some don't.
>>
>> I'm looking for the problem but can't find where this adjustment is done to
>> begin with.  If anybody can tell me where to put a breakpoint, I'll trace
>> through this tomorrow and see if I can find the problem.
>>
>> There's also a problem with option menus giving focus to the wrong thing
>> when the menu is posted (see attached option_menu.jpg)
>>
>>  -- Dave Williss
>> ------
>> Meddle not in the affairs of dragons,
>>    for you are crunchy and taste good with catsup
>>
>> P.S. yes, we really have a "Hidden features..." on the menu.  :-)
> --
> Danny Backx - danny.backx-at-planetinternet.be    http://up.to/danny.backx
>
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
> Use IT products in your business? Tell us what you think of them. Give us
> Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
> http://productguide.itmanagersjournal.com/guidepromo.tmpl
> _______________________________________________
> Lesstif-discuss mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/lesstif-discuss

Reply via email to