[7641] in Athena Bugs
Bug report
daemon@ATHENA.MIT.EDU (Joseph Wang)
Sat Jun 8 22:43:08 1991
To: bugs@ATHENA.MIT.EDU
Cc: mory@ATHENA.MIT.EDU
Date: Sat, 08 Jun 91 22:42:49 EDT
From: Joseph Wang <joe@ATHENA.MIT.EDU>
Submitter Name: Joseph Wang
Organization: MIT Project Athena
Email Address: joe@athena.mit.edu
Phone: 617-225-9410
OSF License Number: 23
Offering and Version: Motif 1.1.2
Component (Module): Toolkit (ScrollBar.c, Scale.c)
Client Hardware: Vax
Client Software: Athena 7.2 (BSD 4.3 with mods), X11R4
Server Hardware: Same
Server Software: Same
Compiler: g++ version 1.39
Severity Level: Critical
Date of First Occurence: 6/5/1991
One Line Description: Scale widget is displayed incorrectly if it is set with
maximum on top
Full Description:
If the Scale widget is initialized with the processing direction set to
XmMAX_ON_TOP, the slider will appear where it should appear if the processing
direction were XmMAX_ON_BOTTOM
Repeated By:
Creating a scale widget with XmMAX_ON_TOP
Proposed Solution:
The bug occurs because the Initialize and the SetValues methods of the
ScrollBar handle the value resource inconsistently. The Initialize method
"flips" the value variable so that the ScrollBar places the slider in the
correct place. The SetValues method does not, and it is the SetValues
method which the Scale widget calls to set the location of the slider.
I would suggest adding the lines:
/* Reverse the value for reverse processing. */
if ((new->scrollBar.processing_direction == XmMAX_ON_LEFT) ||
(new->scrollBar.processing_direction == XmMAX_ON_TOP))
new->scrollBar.value = new->scrollBar.maximum
+ new->scrollBar.minimum - new->scrollBar.value
- new->scrollBar.slider_size;
To the SetValues method of the ScrollBar.