[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34272] trunk/blender/source/blender/ editors/interface/interface_panel.c: Patch [#25409] Changes to panels header "open/close" and "drag" zones
Joshua Leung
aligorith at gmail.com
Wed Jan 12 03:15:39 CET 2011
Revision: 34272
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=34272
Author: aligorith
Date: 2011-01-12 02:15:38 +0000 (Wed, 12 Jan 2011)
Log Message:
-----------
Patch [#25409] Changes to panels header "open/close" and "drag" zones
Submitted by: Peter Tarasenko (pit)
This patch switches the screen real-estate given to the "open/close"
and "drag" zones for panels.
- Now, the entire header is used for resizing (open/close) panels
instead of just the triangle widget being used for this. This makes it
a larger target for clicking on, making it easier to do so (Fitt's Law
in action!)
- Dragging panels now is relegated to the "grabber" zone on the top-
right corner only now. This reflects the lesser importance of panel
reordering in the panel designs now over being able to open/close
them.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_panel.c
Modified: trunk/blender/source/blender/editors/interface/interface_panel.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_panel.c 2011-01-12 01:36:12 UTC (rev 34271)
+++ trunk/blender/source/blender/editors/interface/interface_panel.c 2011-01-12 02:15:38 UTC (rev 34272)
@@ -955,10 +955,11 @@
if(my >= block->maxy) button= 1;
}
else if(block->panel->control & UI_PNL_CLOSE) {
- if(mx <= block->minx+10+PNL_ICON-2) button= 2;
- else if(mx <= block->minx+10+2*PNL_ICON+2) button= 1;
+ /* whole of header can be used to collapse panel (except top-right corner) */
+ if(mx <= block->maxx-8-PNL_ICON) button= 2;
+ //else if(mx <= block->minx+10+2*PNL_ICON+2) button= 1;
}
- else if(mx <= block->minx+10+PNL_ICON+2) {
+ else if(mx <= block->maxx-PNL_ICON-12) {
button= 1;
}
@@ -996,12 +997,9 @@
else
ED_region_tag_redraw(ar);
}
- else if(block->panel->flag & PNL_CLOSED) {
+ else if(mx <= (block->maxx-PNL_ICON-12)+PNL_ICON+2) {
panel_activate_state(C, block->panel, PANEL_STATE_DRAG);
}
- else {
- panel_activate_state(C, block->panel, PANEL_STATE_DRAG);
- }
}
/* XXX should become modal keymap */
More information about the Bf-blender-cvs
mailing list