tags:

views:

104

answers:

1

I am using Shoes 0.r1134, on Mac OS X 10.4

When running the following code,

Shoes.app do
    edit_line("Something")
    edit_line("Something Else")
end

the second edit_line control seems to be placed 4 pixels lower than the first one, in such a way that they are not flush with each other. Why is this?

+1  A: 

I have not been able to build Shoes from source on my machine, but the following line looks suspicious (line 3410 of shoes/shoes/ruby.c):

shoes_edit_line_draw(VALUE self, VALUE c, VALUE actual)
{
  SETUP_CONTROL(0, 0, FALSE);

#ifdef SHOES_QUARTZ
  place.x += 4; place.ix += 4;
  place.y += 4; place.iy += 4;
  place.h += 4; place.ih += 4;
  place.w += 4; place.iw += 4;
#endif

For list_box (line 3552) and button (line 3388), the code only appears to change the heights.

#ifdef SHOES_QUARTZ
  place.h += 8;
  place.ih += 8;
#endif

and

#ifdef SHOES_QUARTZ
  place.h += 8;
  place.ih += 8;
#endif

respectively. However, I do not know enough to determine if this is incorrect.

Zachary Garrett
I've just checked with the latest code and this is still an issue on OSX (I'm only checking on PPC, but I'd assume it would be the same for Intel). Commenting out the place.x and place.y lines gives the desired effect for Herge's example in the question. But, I've not checked if it has any knock on effects elsewhere. I will put an issue in on Github.
i5m