Index: src/kits/interface/ControlLook.cpp
===================================================================
--- src/kits/interface/ControlLook.cpp	(revision 42759)
+++ src/kits/interface/ControlLook.cpp	(working copy)
@@ -931,6 +931,83 @@
 
 void
 BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
+	const rgb_color& base, rgb_color leftFillColor, rgb_color rightFillColor,
+	float sliderScale, float offsetSliderScale, uint32 flags, enum orientation orientation)
+{
+	if (!rect.IsValid() || !rect.Intersects(updateRect))
+		return;
+
+	// separate the bar into three regions
+	float sliderPosition;
+	float offsetSliderPosition;
+	BRect leftBarSide = rect;
+	BRect midBarSide = rect;
+	BRect rightBarSide = rect;
+
+	if (orientation == B_HORIZONTAL) {
+		sliderPosition = floorf(rect.left + 2 + (rect.Width() - 2)
+			* sliderScale);
+		offsetSliderPosition = floorf(rect.left + 2 + (rect.Width() - 2)
+			* offsetSliderScale);
+		leftBarSide.right = offsetSliderPosition - 1;
+		midBarSide.left = offsetSliderPosition;
+		midBarSide.right = sliderPosition - 1;
+		rightBarSide.left = sliderPosition;
+	} else {
+		// NOTE: position is reverse of coords
+		sliderPosition = floorf(rect.top + 2 + (rect.Height() - 2)
+			* (1.0 - sliderScale));
+		offsetSliderPosition = floorf(rect.top + 2 + (rect.Height() - 2)
+			* (1.0 - offsetSliderScale));
+		leftBarSide.top = offsetSliderPosition;
+		midBarSide.bottom = offsetSliderPosition - 1;
+		midBarSide.top = sliderPosition;
+		rightBarSide.bottom = sliderPosition - 1;
+	}
+
+	// fill the background for the corners, exclude the middle bar for now
+	BRegion region(rect);
+	region.Exclude(rightBarSide);
+	region.Exclude(midBarSide);
+	view->ConstrainClippingRegion(&region);
+
+	view->PushState();
+
+	DrawSliderBar(view, rect, updateRect, base, rightFillColor, flags,
+		orientation);
+
+	view->PopState();
+	
+	region.Set(rect);
+	region.Exclude(leftBarSide);
+	region.Exclude(rightBarSide);
+	view->ConstrainClippingRegion(&region);
+	
+	view->PushState();
+	
+	DrawSliderBar(view, rect, updateRect, base, leftFillColor, flags,
+		orientation);
+		
+	view->PopState();
+
+	region.Set(rect);
+	region.Exclude(leftBarSide);
+	region.Exclude(midBarSide);
+	view->ConstrainClippingRegion(&region);
+
+	view->PushState();
+
+	DrawSliderBar(view, rect, updateRect, base, rightFillColor, flags,
+		orientation);
+
+	view->PopState();
+
+	view->ConstrainClippingRegion(NULL);
+}
+
+
+void
+BControlLook::DrawSliderBar(BView* view, BRect rect, const BRect& updateRect,
 	const rgb_color& base, rgb_color fillColor, uint32 flags,
 	enum orientation orientation)
 {
Index: src/kits/interface/Slider.cpp
===================================================================
--- src/kits/interface/Slider.cpp	(revision 42759)
+++ src/kits/interface/Slider.cpp	(working copy)
@@ -32,7 +32,8 @@
 
 BSlider::BSlider(BRect frame, const char* name, const char* label,
 			BMessage* message, int32 minValue, int32 maxValue,
-			thumb_style thumbType, uint32 resizingMode, uint32 flags)
+			thumb_style thumbType, uint32 resizingMode, uint32 flags,
+			bool dualMode)
 	: BControl(frame, name, label, message, resizingMode, flags),
 	fModificationMessage(NULL),
 	fSnoozeAmount(20000),
@@ -52,6 +53,8 @@
 	fOrientation(B_HORIZONTAL),
 	fBarThickness(6.0)
 {
+	fDualMode = dualMode;
+	
 	_InitBarColor();
 
 	_InitObject();
@@ -62,7 +65,7 @@
 BSlider::BSlider(BRect frame, const char *name, const char *label,
 			BMessage *message, int32 minValue, int32 maxValue,
 			orientation posture, thumb_style thumbType, uint32 resizingMode,
-			uint32 flags)
+			uint32 flags, bool dualMode)
 	: BControl(frame, name, label, message, resizingMode, flags),
 	fModificationMessage(NULL),
 	fSnoozeAmount(20000),
@@ -82,6 +85,8 @@
 	fOrientation(posture),
 	fBarThickness(6.0)
 {
+	fDualMode = dualMode;
+	
 	_InitBarColor();
 
 	_InitObject();
@@ -91,7 +96,7 @@
 
 BSlider::BSlider(const char *name, const char *label, BMessage *message,
 			int32 minValue, int32 maxValue, orientation posture,
-			thumb_style thumbType, uint32 flags)
+			thumb_style thumbType, uint32 flags, bool dualMode)
 	: BControl(name, label, message, flags),
 	fModificationMessage(NULL),
 	fSnoozeAmount(20000),
@@ -111,6 +116,8 @@
 	fOrientation(posture),
 	fBarThickness(6.0)
 {
+	fDualMode = dualMode;
+	
 	_InitBarColor();
 
 	_InitObject();
@@ -190,6 +197,12 @@
 		fBarThickness = bthickness;
 	else
 		fBarThickness = 6.0f;
+	
+	if (archive->FindBool("_dualmode", &fDualMode) != B_OK)
+		fDualMode = false;
+	
+	if (archive->FindInt32("_offsetvalue", &fOffsetValue) != B_OK)
+		fOffsetValue = 0;
 
 	_InitObject();
 }
@@ -225,6 +238,12 @@
 void
 BSlider::_InitObject()
 {
+	fOffsetLocation.x = 0;
+	fOffsetLocation.y = 0;
+	fOffsetInitialLocation.x = 0;
+	fOffsetInitialLocation.y = 0;
+	fOffsetValue = fMinValue;
+	
 	fLocation.x = 0;
 	fLocation.y = 0;
 	fInitialLocation.x = 0;
@@ -290,6 +309,11 @@
 		ret = archive->AddInt32("_orient", fOrientation);
 	if (ret == B_OK)
 		ret = archive->AddFloat("_bthickness", fBarThickness);
+	
+	if (ret == B_OK)
+		ret = archive->AddBool("_dualmode", fDualMode);
+	if (ret == B_OK)
+		ret = archive->AddInt32("_offsetvalue", fOffsetValue);
 
 	return ret;
 }
@@ -398,6 +422,11 @@
 		// makes sure the value is within valid bounds
 	_SetLocationForValue(Value());
 		// makes sure the location is correct
+	if (DualMode()) {
+		value = OffsetValue();
+		SetOffsetValue(value);
+		_SetOffsetLocationForValue(OffsetValue());
+	}
 	UpdateTextChanged();
 }
 
@@ -502,8 +531,13 @@
 			return;
 	}
 
-	if (newValue < fMinValue)
-		newValue = fMinValue;
+	if (DualMode()) {
+		if (newValue < OffsetValue())
+			newValue = OffsetValue();
+	} else {
+		if (newValue < fMinValue)
+			newValue = fMinValue;
+	}
 	if (newValue > fMaxValue)
 		newValue = fMaxValue;
 
@@ -566,41 +600,81 @@
 	if (!IsEnabled())
 		return;
 
-	if (BarFrame().Contains(point) || ThumbFrame().Contains(point))
+	if (ThumbFrame().Contains(point) && !(Value() == fMaxValue && DualMode() 
+		&& ThumbFrame().Intersects(OffsetThumbFrame()))) {
 		fInitialLocation = _Location();
 
-	uint32 buttons;
-	GetMouse(&point, &buttons, true);
+		uint32 buttons;
+		GetMouse(&point, &buttons, true);
+	
+		_ConstrainPoint(point, fInitialLocation);
+		SetValue(ValueForPoint(point));
+	
+		if (_Location() != fInitialLocation)
+			InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+	
+		if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) {
+			_SetTrackingOffset(false);
+			SetTracking(true);
+			SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);
+		} else {
+			// synchronous mouse tracking
+			BPoint prevPoint;
+	
+			while (buttons) {
+				prevPoint = point;
+	
+				snooze(SnoozeAmount());
+				GetMouse(&point, &buttons, true);
+	
+				if (_ConstrainPoint(point, prevPoint)) {
+					int32 value = ValueForPoint(point);
+					if (value != Value()) {
+						SetValue(value);
+						InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+					}
+				}
+			}
+			if (_Location() != fInitialLocation)
+				Invoke();
+		}
+	} else if (DualMode() && OffsetThumbFrame().Contains(point)) {
+		fOffsetInitialLocation = _OffsetLocation();
 
-	_ConstrainPoint(point, fInitialLocation);
-	SetValue(ValueForPoint(point));
-
-	if (_Location() != fInitialLocation)
-		InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
-
-	if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) {
-		SetTracking(true);
-		SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);
-	} else {
-		// synchronous mouse tracking
-		BPoint prevPoint;
-
-		while (buttons) {
-			prevPoint = point;
-
-			snooze(SnoozeAmount());
-			GetMouse(&point, &buttons, true);
-
-			if (_ConstrainPoint(point, prevPoint)) {
-				int32 value = ValueForPoint(point);
-				if (value != Value()) {
-					SetValue(value);
-					InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+		uint32 buttons;
+		GetMouse(&point, &buttons, true);
+	
+		_ConstrainPoint(point, fOffsetInitialLocation);
+		SetOffsetValue(ValueForPoint(point));
+	
+		if (_OffsetLocation() != fOffsetInitialLocation)
+			InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+	
+		if (Window()->Flags() & B_ASYNCHRONOUS_CONTROLS) {
+			_SetTrackingOffset(true);
+			SetTracking(true);
+			SetMouseEventMask(B_POINTER_EVENTS, B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);
+		} else {
+			// synchronous mouse tracking
+			BPoint prevPoint;
+	
+			while (buttons) {
+				prevPoint = point;
+	
+				snooze(SnoozeAmount());
+				GetMouse(&point, &buttons, true);
+	
+				if (_ConstrainPoint(point, prevPoint)) {
+					int32 value = ValueForPoint(point);
+					if (value != OffsetValue()) {
+						SetOffsetValue(value);
+						InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+					}
 				}
 			}
+			if (_OffsetLocation() != fOffsetInitialLocation)
+				Invoke();
 		}
-		if (_Location() != fInitialLocation)
-			Invoke();
 	}
 }
 
@@ -608,7 +682,13 @@
 void
 BSlider::MouseUp(BPoint point)
 {
-	if (IsTracking()) {
+	if (IsTracking() && _TrackingOffset()) {
+		if (_OffsetLocation() != fOffsetInitialLocation)
+			Invoke();
+
+		SetTracking(false);
+		_SetTrackingOffset(false);
+	} else if (IsTracking()) {
 		if (_Location() != fInitialLocation)
 			Invoke();
 
@@ -621,7 +701,15 @@
 void
 BSlider::MouseMoved(BPoint point, uint32 transit, const BMessage *message)
 {
-	if (IsTracking()) {
+	if (IsTracking() && _TrackingOffset()) {
+		if (_ConstrainPoint(point, _OffsetLocation())) {
+			int32 value = ValueForPoint(point);
+			if (value != OffsetValue()) {
+				SetOffsetValue(value);
+				InvokeNotify(ModificationMessage(), B_CONTROL_MODIFIED);
+			}
+		}
+	} else if (IsTracking()) {
 		if (_ConstrainPoint(point, _Location())) {
 			int32 value = ValueForPoint(point);
 			if (value != Value()) {
@@ -686,8 +774,13 @@
 void
 BSlider::SetValue(int32 value)
 {
-	if (value < fMinValue)
-		value = fMinValue;
+	if (DualMode()) {
+		if (value < OffsetValue())
+			value = OffsetValue();
+	} else {
+		if (value < fMinValue)
+			value = fMinValue;
+	}
 	if (value > fMaxValue)
 		value = fMaxValue;
 
@@ -729,7 +822,62 @@
 }
 
 
+void
+BSlider::SetOffsetValue(int32 value)
+{
+	if (DualMode()) {
+		if (value < fMinValue)
+			value = fMinValue;
+		if (value > Value())
+			value = Value();
+	
+		if (value == OffsetValue())
+			return;
+	
+		_SetOffsetLocationForValue(value);
+	
+		BRect oldThumbFrame = OffsetThumbFrame();
+	
+		// While it would be enough to do this dependent on fUseFillColor,
+		// that doesn't work out if DrawBar() has been overridden by a sub class
+		if (fOrientation == B_HORIZONTAL)
+			oldThumbFrame.top = BarFrame().top;
+		else
+			oldThumbFrame.left = BarFrame().left;
+	
+		fOffsetValue = value;
+		BRect invalid = oldThumbFrame | OffsetThumbFrame();
+	
+		if (Style() == B_TRIANGLE_THUMB) {
+			// 1) We need to take care of pixels touched because of anti-aliasing.
+			// 2) We need to update the region with the focus mark as well. (A
+			// method BSlider::FocusMarkFrame() would be nice as well.)
+			if (fOrientation == B_HORIZONTAL) {
+				if (IsFocus())
+					invalid.bottom += 2;
+				invalid.InsetBy(-1, 0);
+			} else {
+				if (IsFocus())
+					invalid.left -= 2;
+				invalid.InsetBy(0, -1);
+			}
+		}
+	
+		Invalidate(invalid);
+	
+		UpdateTextChanged();
+	}
+}
+
+
 int32
+BSlider::OffsetValue() const
+{
+	return fOffsetValue;
+}
+
+
+int32
 BSlider::ValueForPoint(BPoint location) const
 {
 	float min;
@@ -778,6 +926,31 @@
 
 
 void
+BSlider::SetOffsetPosition(float position)
+{
+	if (DualMode()) {
+		if (position <= 0.0f)
+			SetOffsetValue(fMinValue);
+		else if (position >= 1.0f)
+			SetOffsetValue(fMaxValue);
+		else
+			SetOffsetValue((int32)(position * (fMaxValue - fMinValue) + fMinValue));
+	}
+}
+
+
+float
+BSlider::OffsetPosition() const
+{
+	float range = (float)(fMaxValue - fMinValue);
+	if (range == 0.0f)
+		range = 1.0f;
+
+	return (float)(OffsetValue() - fMinValue) / range;
+}
+
+
+void
 BSlider::SetEnabled(bool on)
 {
 	BControl::SetEnabled(on);
@@ -794,6 +967,28 @@
 }
 
 
+void
+BSlider::SetDualMode(bool dualMode)
+{
+	fDualMode = dualMode;
+	if (!dualMode) {
+		fOffsetValue = fMinValue;
+		_SetOffsetLocationForValue(fOffsetValue);
+	}
+	
+	Invalidate();
+	
+	UpdateTextChanged();
+}
+
+
+bool
+BSlider::DualMode() const
+{
+	return fDualMode;
+}
+
+
 // #pragma mark - drawing
 
 
@@ -870,8 +1065,13 @@
 		rgb_color base = ui_color(B_PANEL_BACKGROUND_COLOR);
 		rgb_color rightFillColor = fBarColor;
 		rgb_color leftFillColor = fUseFillColor ? fFillColor : fBarColor;
-		be_control_look->DrawSliderBar(view, frame, frame, base, leftFillColor,
-			rightFillColor, Position(), flags, fOrientation);
+		if (DualMode()) {
+			be_control_look->DrawSliderBar(view, frame, frame, base, leftFillColor,
+				rightFillColor, Position(), OffsetPosition(), flags, fOrientation);
+		} else {
+			be_control_look->DrawSliderBar(view, frame, frame, base, leftFillColor,
+				rightFillColor, Position(), flags, fOrientation);
+		}
 		return;
 	}
 
@@ -908,56 +1108,123 @@
 		fillColor.alpha	= 255;
 	}
 
-	// exclude the block thumb from the bar filling
-
-	BRect lowerFrame = frame.InsetByCopy(1, 1);
-	lowerFrame.top++;
-	lowerFrame.left++;
-	BRect upperFrame = lowerFrame;
-	BRect thumbFrame;
-
-	if (Style() == B_BLOCK_THUMB) {
-		thumbFrame = ThumbFrame();
-
-		if (fOrientation == B_HORIZONTAL) {
-			lowerFrame.right = thumbFrame.left;
-			upperFrame.left = thumbFrame.right;
-		} else {
-			lowerFrame.top = thumbFrame.bottom;
-			upperFrame.bottom = thumbFrame.top;
+	if (DualMode()) {
+		// exclude the block thumb from the bar filling
+	
+		BRect lowerFrame = frame.InsetByCopy(1, 1);
+		lowerFrame.top++;
+		lowerFrame.left++;
+		BRect upperFrame = lowerFrame;
+		BRect midFrame = lowerFrame;
+		BRect thumbFrame;
+		BRect offsetThumbFrame;
+	
+		if (Style() == B_BLOCK_THUMB) {
+			thumbFrame = ThumbFrame();
+			offsetThumbFrame = OffsetThumbFrame();
+	
+			if (fOrientation == B_HORIZONTAL) {
+				lowerFrame.right = offsetThumbFrame.left;
+				midFrame.left = offsetThumbFrame.right;
+				midFrame.right = thumbFrame.left;
+				upperFrame.left = thumbFrame.right;
+			} else {
+				lowerFrame.top = offsetThumbFrame.bottom;
+				midFrame.bottom = offsetThumbFrame.top;
+				midFrame.top = thumbFrame.bottom;
+				upperFrame.bottom = thumbFrame.top;
+			}
+		} else if (fUseFillColor) {
+			if (fOrientation == B_HORIZONTAL) {
+				lowerFrame.right = floor(lowerFrame.left - 1 + OffsetPosition()
+					* (lowerFrame.Width() + 1));
+				midFrame.left = lowerFrame.right;
+				midFrame.right = floor(midFrame.left - 1 + Position()
+					* (midFrame.Width() + 1));
+				upperFrame.left = midFrame.right;
+			} else {
+				lowerFrame.top = floor(lowerFrame.bottom + 1 - OffsetPosition()
+					* (lowerFrame.Height() + 1));
+				midFrame.bottom = lowerFrame.top;
+				midFrame.top = floor(midFrame.bottom + 1 - Position()
+					* (midFrame.Height() + 1));
+				upperFrame.bottom = midFrame.top;
+			}
 		}
-	} else if (fUseFillColor) {
-		if (fOrientation == B_HORIZONTAL) {
-			lowerFrame.right = floor(lowerFrame.left - 1 + Position()
-				* (lowerFrame.Width() + 1));
-			upperFrame.left = lowerFrame.right;
-		} else {
-			lowerFrame.top = floor(lowerFrame.bottom + 1 - Position()
-				* (lowerFrame.Height() + 1));
-			upperFrame.bottom = lowerFrame.top;
+	
+		view->SetHighColor(barColor);
+		view->FillRect(upperFrame);
+		view->FillRect(lowerFrame);
+	
+		if (Style() == B_BLOCK_THUMB || fUseFillColor) {
+			if (fUseFillColor)
+				view->SetHighColor(fillColor);
+			view->FillRect(midFrame);
 		}
+	
+		if (Style() == B_BLOCK_THUMB) {
+			// We don't want to stroke the lines over the thumb
+	
+			PushState();
+	
+			BRegion region;
+			GetClippingRegion(&region);
+			region.Exclude(thumbFrame);
+			region.Exclude(offsetThumbFrame);
+			ConstrainClippingRegion(&region);
+		}
+	} else {
+		// exclude the block thumb from the bar filling
+	
+		BRect lowerFrame = frame.InsetByCopy(1, 1);
+		lowerFrame.top++;
+		lowerFrame.left++;
+		BRect upperFrame = lowerFrame;
+		BRect thumbFrame;
+	
+		if (Style() == B_BLOCK_THUMB) {
+			thumbFrame = ThumbFrame();
+	
+			if (fOrientation == B_HORIZONTAL) {
+				lowerFrame.right = thumbFrame.left;
+				upperFrame.left = thumbFrame.right;
+			} else {
+				lowerFrame.top = thumbFrame.bottom;
+				upperFrame.bottom = thumbFrame.top;
+			}
+		} else if (fUseFillColor) {
+			if (fOrientation == B_HORIZONTAL) {
+				lowerFrame.right = floor(lowerFrame.left - 1 + Position()
+					* (lowerFrame.Width() + 1));
+				upperFrame.left = lowerFrame.right;
+			} else {
+				lowerFrame.top = floor(lowerFrame.bottom + 1 - Position()
+					* (lowerFrame.Height() + 1));
+				upperFrame.bottom = lowerFrame.top;
+			}
+		}
+	
+		view->SetHighColor(barColor);
+		view->FillRect(upperFrame);
+	
+		if (Style() == B_BLOCK_THUMB || fUseFillColor) {
+			if (fUseFillColor)
+				view->SetHighColor(fillColor);
+			view->FillRect(lowerFrame);
+		}
+	
+		if (Style() == B_BLOCK_THUMB) {
+			// We don't want to stroke the lines over the thumb
+	
+			PushState();
+	
+			BRegion region;
+			GetClippingRegion(&region);
+			region.Exclude(thumbFrame);
+			ConstrainClippingRegion(&region);
+		}
 	}
 
-	view->SetHighColor(barColor);
-	view->FillRect(upperFrame);
-
-	if (Style() == B_BLOCK_THUMB || fUseFillColor) {
-		if (fUseFillColor)
-			view->SetHighColor(fillColor);
-		view->FillRect(lowerFrame);
-	}
-
-	if (Style() == B_BLOCK_THUMB) {
-		// We don't want to stroke the lines over the thumb
-
-		PushState();
-
-		BRegion region;
-		GetClippingRegion(&region);
-		region.Exclude(thumbFrame);
-		ConstrainClippingRegion(&region);
-	}
-
 	view->SetHighColor(darken1);
 	view->StrokeLine(BPoint(frame.left, frame.top),
 					 BPoint(frame.left + 1.0f, frame.top));
@@ -1088,9 +1355,16 @@
 BSlider::DrawThumb()
 {
 	if (Style() == B_BLOCK_THUMB)
-		_DrawBlockThumb();
+		_DrawBlockThumb(ThumbFrame());
 	else
-		_DrawTriangleThumb();
+		_DrawTriangleThumb(ThumbFrame());
+	
+	if (DualMode()) {
+		if (Style() == B_BLOCK_THUMB)
+			_DrawBlockThumb(OffsetThumbFrame());
+		else
+			_DrawTriangleThumb(OffsetThumbFrame());
+	}
 }
 
 
@@ -1119,6 +1393,26 @@
 				BPoint(frame.left - 2.0f, frame.bottom));
 		}
 	}
+	
+	if (DualMode()) {
+		frame = OffsetThumbFrame();
+	
+		if (fStyle == B_BLOCK_THUMB) {
+			frame.left += 2.0f;
+			frame.top += 2.0f;
+			frame.right -= 3.0f;
+			frame.bottom -= 3.0f;
+			OffscreenView()->StrokeRect(frame);
+		} else {
+			if (fOrientation == B_HORIZONTAL) {
+				OffscreenView()->StrokeLine(BPoint(frame.left, frame.bottom + 2.0f),
+					BPoint(frame.right, frame.bottom + 2.0f));
+			} else {
+				OffscreenView()->StrokeLine(BPoint(frame.left - 2.0f, frame.top),
+					BPoint(frame.left - 2.0f, frame.bottom));
+			}
+		}
+	}
 }
 
 
@@ -1410,6 +1704,58 @@
 }
 
 
+BRect
+BSlider::OffsetThumbFrame() const
+{
+	if (DualMode()) {
+		// TODO: The slider looks really ugly and broken when it is too little.
+		// I would suggest using BarFrame() here to get the top and bottom coords
+		// and spread them further apart for the thumb
+	
+		BRect frame = Bounds();
+	
+		font_height fontHeight;
+		GetFontHeight(&fontHeight);
+	
+		float textHeight = ceilf(fontHeight.ascent) + ceilf(fontHeight.descent);
+	
+		if (fStyle == B_BLOCK_THUMB) {
+			if (Orientation() == B_HORIZONTAL) {
+				frame.left = floorf(OffsetPosition() * (_MaxPosition()
+					- _MinPosition()) + _MinPosition()) - 8;
+				frame.top = 2 + (Label() || fUpdateText ? textHeight + 4 : 0);
+				frame.right = frame.left + 17;
+				frame.bottom = frame.top + fBarThickness + 7;
+			} else {
+				frame.left = floor((frame.Width() - fBarThickness) / 2) - 4;
+				frame.top = floorf(OffsetPosition() * (_MaxPosition()
+					- _MinPosition()) + _MinPosition()) - 8;
+				frame.right = frame.left + fBarThickness + 7;
+				frame.bottom = frame.top + 17;
+			}
+		} else {
+			if (Orientation() == B_HORIZONTAL) {
+				frame.left = floorf(OffsetPosition() * (_MaxPosition()
+					- _MinPosition()) + _MinPosition()) - 6;
+				frame.right = frame.left + 12;
+				frame.top = 3 + fBarThickness + (Label() ? textHeight + 4 : 0);
+				frame.bottom = frame.top + 8;
+			} else {
+				frame.left = floorf((frame.Width() + fBarThickness) / 2) - 3;
+				frame.top = floorf(OffsetPosition() * (_MaxPosition()
+					- _MinPosition())) + _MinPosition() - 6;
+				frame.right = frame.left + 8;
+				frame.bottom = frame.top + 12;
+			}
+		}
+		
+		return frame;
+	}
+
+	return BRect(0, 0, 0, 0);
+}
+
+
 void
 BSlider::SetFlags(uint32 flags)
 {
@@ -1781,9 +2127,8 @@
 // #pragma mark - private
 
 void
-BSlider::_DrawBlockThumb()
+BSlider::_DrawBlockThumb(BRect frame)
 {
-	BRect frame = ThumbFrame();
 	BView *view = OffscreenView();
 
 	if (be_control_look != NULL) {
@@ -1915,9 +2260,8 @@
 
 
 void
-BSlider::_DrawTriangleThumb()
+BSlider::_DrawTriangleThumb(BRect frame)
 {
-	BRect frame = ThumbFrame();
 	BView *view = OffscreenView();
 
 	if (be_control_look != NULL) {
@@ -2051,6 +2395,35 @@
 }
 
 
+BPoint
+BSlider::_OffsetLocation() const
+{
+	return fOffsetLocation;
+}
+
+
+void
+BSlider::_SetOffsetLocationForValue(int32 value)
+{
+	BPoint loc;
+	float range = (float)(fMaxValue - fMinValue);
+	if (range == 0)
+		range = 1;
+
+	float pos = (float)(value - fMinValue) / range *
+		(_MaxPosition() - _MinPosition());
+
+	if (fOrientation == B_HORIZONTAL) {
+		loc.x = ceil(_MinPosition() + pos);
+		loc.y = 0;
+	} else {
+		loc.x = 0;
+		loc.y = floor(_MaxPosition() - pos);
+	}
+	fOffsetLocation = loc;
+}
+
+
 float
 BSlider::_MinPosition() const
 {
@@ -2167,6 +2540,20 @@
 }
 
 
+void
+BSlider::_SetTrackingOffset(bool tracking)
+{
+	fTrackingOffset = tracking;
+}
+
+
+bool
+BSlider::_TrackingOffset() const
+{
+	return fTrackingOffset;
+}
+
+
 // #pragma mark - FBC padding
 
 void BSlider::_ReservedSlider6() {}
Index: headers/os/interface/Slider.h
===================================================================
--- headers/os/interface/Slider.h	(revision 42759)
+++ headers/os/interface/Slider.h	(working copy)
@@ -33,7 +33,8 @@
 									uint32 resizingMode
 										= B_FOLLOW_LEFT | B_FOLLOW_TOP,
 									uint32 flags = B_NAVIGABLE | B_WILL_DRAW
-										| B_FRAME_EVENTS);
+										| B_FRAME_EVENTS,
+									bool dualMode = false);
 
 								BSlider(BRect frame, const char* name,
 									const char* label, BMessage* message,
@@ -43,14 +44,16 @@
 									uint32 resizingMode
 										= B_FOLLOW_LEFT | B_FOLLOW_TOP,
 									uint32 flags = B_NAVIGABLE | B_WILL_DRAW
-										| B_FRAME_EVENTS);
+										| B_FRAME_EVENTS,
+									bool dualMode = false);
 
 								BSlider(const char* name, const char* label,
 									BMessage* message, int32 minValue,
 									int32 maxValue, orientation posture,
 									thumb_style thumbType = B_BLOCK_THUMB,
 									uint32 flags = B_NAVIGABLE | B_WILL_DRAW
-										| B_FRAME_EVENTS);
+										| B_FRAME_EVENTS,
+									bool dualMode = false);
 
 								BSlider(BMessage* archive);
 	virtual						~BSlider();
@@ -82,8 +85,13 @@
 									const char* maxLabel);
 			const char*			MinLimitLabel() const;
 			const char*			MaxLimitLabel() const;
+			
+	virtual void				SetOffsetValue(int32);
+			int32				OffsetValue() const;		
 	virtual	void				SetValue(int32);
 	virtual int32				ValueForPoint(BPoint) const;
+	virtual void				SetOffsetPosition(float);
+			float				OffsetPosition() const;
 	virtual void				SetPosition(float);
 			float				Position() const;
 	virtual void				SetEnabled(bool on);
@@ -103,6 +111,7 @@
 	virtual BRect				BarFrame() const;
 	virtual BRect				HashMarksFrame() const;
 	virtual BRect				ThumbFrame() const;
+	virtual BRect				OffsetThumbFrame() const;
 
 	virtual	void				SetFlags(uint32 flags);
 	virtual	void				SetResizingMode(uint32 mode);
@@ -161,13 +170,18 @@
 	virtual	BSize				MinSize();
 	virtual	BSize				MaxSize();
 	virtual	BSize				PreferredSize();
+	
+			void				SetDualMode(bool);
+			bool				DualMode() const;
 
 private:
-			void				_DrawBlockThumb();
-			void				_DrawTriangleThumb();
+			void				_DrawBlockThumb(BRect);
+			void				_DrawTriangleThumb(BRect);
 
 			BPoint				_Location() const;
 			void				_SetLocationForValue(int32 value);
+			BPoint				_OffsetLocation() const;
+			void				_SetOffsetLocationForValue(int32 value);
 
 			float				_MinPosition() const;
 			float				_MaxPosition() const;
@@ -178,6 +192,9 @@
 
 			void				_InitBarColor();
 			void				_InitObject();
+			
+			void				_SetTrackingOffset(bool);
+			bool				_TrackingOffset() const;			
 
 private:
 	// FBC padding and forbidden methods
@@ -217,6 +234,14 @@
 
 			BPoint 				fLocation;
 			BPoint				fInitialLocation;
+			BPoint				fOffsetLocation;
+			BPoint				fOffsetInitialLocation;
+			
+			int32				fOffsetValue;
+			
+			bool				fDualMode;
+			
+			bool				fTrackingOffset;
 
 			orientation			fOrientation;
 			float				fBarThickness;
Index: headers/os/interface/ControlLook.h
===================================================================
--- headers/os/interface/ControlLook.h	(revision 42759)
+++ headers/os/interface/ControlLook.h	(working copy)
@@ -185,6 +185,14 @@
 									float sliderScale, uint32 flags,
 									enum orientation orientation);
 
+	virtual void				DrawSliderBar(BView* view, BRect rect,
+									const BRect& updateRect,
+									const rgb_color& base,
+									rgb_color leftFillColor,
+									rgb_color rightFillColor,
+									float sliderScale, float offsetSliderScale,
+									uint32 flags, enum orientation orientation);
+
 	virtual	void				DrawSliderBar(BView* view, BRect rect,
 									const BRect& updateRect,
 									const rgb_color& base, rgb_color fillColor,
