[gnome-shell] slider: Extend the trough to the allocation extents



commit a01469fb086b57319b3bfa9fc807493171c0106f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Tue Jun 11 23:33:54 2013 -0400

    slider: Extend the trough to the allocation extents
    
    This aligns the edge of the slider with the allocation of items
    under it, which is what we want to happen in the new aggregate
    menu.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=702825

 js/ui/slider.js |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/slider.js b/js/ui/slider.js
index ba8b9f6..534b374 100644
--- a/js/ui/slider.js
+++ b/js/ui/slider.js
@@ -48,7 +48,6 @@ const Slider = new Lang.Class({
         let [hasHandleColor, handleBorderColor] =
             themeNode.lookup_color('-slider-handle-border-color', false);
 
-        let sliderWidth = width - 2 * handleRadius;
         let sliderHeight = themeNode.get_length('-slider-height');
 
         let sliderBorderWidth = themeNode.get_length('-slider-border-width');
@@ -64,7 +63,7 @@ const Slider = new Lang.Class({
             sliderActiveColor.green / 255,
             sliderActiveColor.blue / 255,
             sliderActiveColor.alpha / 255);
-        cr.rectangle(handleRadius, (height - sliderHeight) / 2, sliderWidth * this._value, sliderHeight);
+        cr.rectangle(0, (height - sliderHeight) / 2, width * this._value, sliderHeight);
         cr.fillPreserve();
         cr.setSourceRGBA (
             sliderActiveBorderColor.red / 255,
@@ -79,7 +78,7 @@ const Slider = new Lang.Class({
             sliderColor.green / 255,
             sliderColor.blue / 255,
             sliderColor.alpha / 255);
-        cr.rectangle(handleRadius + sliderWidth * this._value, (height - sliderHeight) / 2, sliderWidth * (1 
- this._value), sliderHeight);
+        cr.rectangle(width * this._value, (height - sliderHeight) / 2, width * (1 - this._value), 
sliderHeight);
         cr.fillPreserve();
         cr.setSourceRGBA (
             sliderBorderColor.red / 255,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]