Revision: 26285
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26285
Author:   aligorith
Date:     2010-01-26 11:52:42 +0100 (Tue, 26 Jan 2010)

Log Message:
-----------
Bugfix #19344: Using the scroll bar zoom widget doesn't work in some situations

Zoom widgets now only show if the scrollbar only shows scale markings (i.e. 
timegrids).


---

Also removed an empty header file.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/view2d.c

Removed Paths:
-------------
    trunk/blender/source/blender/editors/include/ED_interface.h

Deleted: trunk/blender/source/blender/editors/include/ED_interface.h
===================================================================

Modified: trunk/blender/source/blender/editors/interface/view2d.c
===================================================================
--- trunk/blender/source/blender/editors/interface/view2d.c     2010-01-26 
10:29:10 UTC (rev 26284)
+++ trunk/blender/source/blender/editors/interface/view2d.c     2010-01-26 
10:52:42 UTC (rev 26285)
@@ -1605,9 +1605,20 @@
                        
                        state= (v2d->scroll_ui & 
V2D_SCROLL_H_ACTIVE)?UI_SCROLL_PRESSED:0;
                        
-                       if (!(v2d->keepzoom & V2D_LOCKZOOM_X) && (slider.xmax - 
slider.xmin > V2D_SCROLLER_HANDLE_SIZE))
+                       /* show zoom handles if:
+                        *      - zooming on x-axis is allowed (no scroll 
otherwise)
+                        *      - slider bubble is large enough (no overdraw 
confusion)
+                        *      - scale is shown on the scroller 
+                        *        (workaround to make sure that button windows 
don't show these, 
+                        *              and only the time-grids with their 
zoomability can do so)
+                        */
+                       if ((v2d->keepzoom & V2D_LOCKZOOM_X)==0 && 
+                               (v2d->scroll & V2D_SCROLL_SCALE_HORIZONTAL) &&
+                               (slider.xmax - slider.xmin > 
V2D_SCROLLER_HANDLE_SIZE))
+                       {
                                state |= UI_SCROLL_ARROWS;
-                               
+                       }
+                       
                        uiWidgetScrollDraw(&wcol, &hor, &slider, state);
                }
                
@@ -1702,8 +1713,19 @@
                        
                        state= (v2d->scroll_ui & 
V2D_SCROLL_V_ACTIVE)?UI_SCROLL_PRESSED:0;
                        
-                       if (!(v2d->keepzoom & V2D_LOCKZOOM_Y) && (slider.ymax - 
slider.ymin > V2D_SCROLLER_HANDLE_SIZE))
+                       /* show zoom handles if:
+                        *      - zooming on y-axis is allowed (no scroll 
otherwise)
+                        *      - slider bubble is large enough (no overdraw 
confusion)
+                        *      - scale is shown on the scroller 
+                        *        (workaround to make sure that button windows 
don't show these, 
+                        *              and only the time-grids with their 
zoomability can do so)
+                        */
+                       if ((v2d->keepzoom & V2D_LOCKZOOM_Y)==0 && 
+                               (v2d->scroll & V2D_SCROLL_SCALE_VERTICAL) &&
+                               (slider.ymax - slider.ymin > 
V2D_SCROLLER_HANDLE_SIZE))
+                       {
                                state |= UI_SCROLL_ARROWS;
+                       }
                                
                        uiWidgetScrollDraw(&wcol, &vert, &slider, state);
                }


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to