| I think I can identify some of the problem Yuji is talking about.
In looking at the code, here's what's happening (at least to my
understanding):
In CREATEPANEL (where the session manager panel gets created) it
creates an ADB to hold the label (the header text) and a text widget
for messages. The label for the header text is created with the
following args:
left attachment = attach positon (specified as 50 or in other
words, the middle of the box)
top attachment = attach adb (with a small offset)
a translation table which causes a routine to get called for
MapNotify events
The map routine checks to see if this is the first time the label
has been mapped and if so it:
calls XtGetValues to get the width of the label widget
calls XtSetValues to set the adbLeftOffset to -(width/4) in
an attempt to center the label
Two problems I've witnessed with this are:
if you're using 75dpi font (default) and your text is too long,
it appears that the value calculated for adbLeftOffset is too
large a negative number and is ignored, causing your label to
start in the middle of the box
if you're using 100dpi font, then you get different problems
and the centering algorithm never works correctly. I'm guessing
this is because width of the label widget comes back in pixels
and adbLeftOffset is interpreted as font units by default (and
with 100dpi you've got a larger font).
I'm not sure I have all this correct, but I think I've got the jist
of it.
Mark
p.s. (Hi Yuji! Tell Toru hello for me)
|