View | Details | Raw Unified | Return to bug 188081
Collapse All | Expand All

(-)src/org/eclipse/draw2d/ScrollBarLayout.java (-2 / +2 lines)
Lines 112-119 Link Here
112
	if (thumb != null)
112
	if (thumb != null)
113
		thumb.setVisible(trackBounds.height > thumbHeight);
113
		thumb.setVisible(trackBounds.height > thumbHeight);
114
114
115
	int thumbY = trackBounds.y + (trackBounds.height - thumbHeight) 
115
	int thumbY = trackBounds.y + Math.round((trackBounds.height - thumbHeight) 
116
					* (scrollBar.getValue() - min) / valueRange;
116
			* ((scrollBar.getValue() - min) / (float)valueRange));
117
117
118
	Rectangle thumbBounds =  new Rectangle(
118
	Rectangle thumbBounds =  new Rectangle(
119
		trackBounds.x,
119
		trackBounds.x,
(-)src/org/eclipse/draw2d/ScrollBar.java (-1 / +1 lines)
Lines 628-634 Link Here
628
		if (!armed) 
628
		if (!armed) 
629
			return;
629
			return;
630
		Dimension difference = transposer.t(me.getLocation().getDifference(start));
630
		Dimension difference = transposer.t(me.getLocation().getDifference(start));
631
		int change = getValueRange() * difference.height / dragRange;
631
		int change = Math.round(difference.height * (getValueRange()/(float)dragRange));
632
		setValue(revertValue + change);
632
		setValue(revertValue + change);
633
		me.consume();
633
		me.consume();
634
	}
634
	}

Return to bug 188081