hmm. don't know what i was thinking there.

this should work better.


SVN revision: 5822
This commit is contained in:
rephorm 2002-01-06 21:02:02 +00:00 committed by rephorm
parent 1da030ae9e
commit 8bbd04e127
1 changed files with 2 additions and 2 deletions

View File

@ -140,9 +140,9 @@ e_sb_base_down_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
else if (!strcmp(class, "Scrollbar_Trough"))
{
if (sb->direction)
sb->val = ( y - sb->bar_area.y );
sb->val = ( y - sb->bar_area.y) * sb->max / sb->bar_area.h - sb->bar_area.h / 2;
else
sb->val = ( x - sb->bar_area.x );
sb->val = ( x - sb->bar_area.x) * sb->max / sb->bar_area.w - sb->bar_area.w / 2;
if (sb->val < 0) sb->val = 0;
if ((sb->val + sb->range) > sb->max) sb->val = sb->max - sb->range;