Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2011-01-12 05:15:38 +0300
committerJoshua Leung <aligorith@gmail.com>2011-01-12 05:15:38 +0300
commit21fc4cabaff9b1caa476af9d700195fb239a07c6 (patch)
treeca6169044e2a67f4f042a7b523169e5785d5d793 /source/blender/editors/interface
parentbbdf47aa0bd964be143ae03fb488ce13fa2228bd (diff)
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.
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_panel.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c
index d819ecd7ec8..db4af4c11e5 100644
--- a/source/blender/editors/interface/interface_panel.c
+++ b/source/blender/editors/interface/interface_panel.c
@@ -955,10 +955,11 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
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,10 +997,7 @@ static void ui_handle_panel_header(const bContext *C, uiBlock *block, int mx, in
else
ED_region_tag_redraw(ar);
}
- else if(block->panel->flag & PNL_CLOSED) {
- panel_activate_state(C, block->panel, PANEL_STATE_DRAG);
- }
- else {
+ else if(mx <= (block->maxx-PNL_ICON-12)+PNL_ICON+2) {
panel_activate_state(C, block->panel, PANEL_STATE_DRAG);
}
}