diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-19 18:16:34 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-19 18:16:34 +0300 |
commit | ca320003f4c6129c559d2d8f1628b74e8d7a5066 (patch) | |
tree | 7c36a6cf603a62a9be01b797e42641f8d005d1c4 /source/blender/include/interface.h | |
parent | 555a3d02c7c842cb3a53d63ec6c695541ba845b1 (diff) |
Patch #3365, Toolbox from Tuhopuu
Patch prvovided by Guillermo, code was - afaik - from Rob Haarsma.
This changes the toolbox (space menu) to have the first level aligned
vertically. Works much easier that way, and since the items open either
left or right, it doesn't flip order of the contents for it either.
To allow people to test (and to compare) it's a user menu setting (in
View & Controls, "Plain menus"). I've turned this on by default though,
since I propose to not have it a user setting. User setting can be
removed later.
Fixed two bugs in patch:
- if saved in user settings, first time usage of this toolbox opened in
wrong location
- Button for "plain menus" was writing a short in an int
(causing this new menu not to work for big endian systems)
As a bonus I've added the long wanted hotkey support for opening and
closing sublevels of pulldowns with arrow keys!
I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).
I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
(like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
bottom for top headers. We can expect the UI is configured consistantly
for headers, so in general the menus will appear consistant as well.
Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.
If people like to check this themselves; uncomment the lines in the top
of the function uiBlockFlipOrder() in src/interface.c
Diffstat (limited to 'source/blender/include/interface.h')
-rw-r--r-- | source/blender/include/interface.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/include/interface.h b/source/blender/include/interface.h index ed6eed109e9..0b61ed80010 100644 --- a/source/blender/include/interface.h +++ b/source/blender/include/interface.h @@ -186,13 +186,14 @@ struct uiBlock { short autofill, win, winq, direction, dt; short needflush, auto_open, in_use, pad; //flush see below void *overdraw; + struct uiBlock *parent; // nested pulldowns - float xofs, yofs; // offset to parent button - rctf parentrct; // for pulldowns, rect the mouse is allowed outside of menu (parent button) - rctf safety; // pulldowns, to detect outside, can differ per case how it is created + float xofs, yofs; // offset to parent button + rctf parentrct; // for pulldowns, rect the mouse is allowed outside of menu (parent button) + rctf safety; // pulldowns, to detect outside, can differ per case how it is created - rctf flush; // rect to be flushed to frontbuffer - int handler; // for panels in other windows than buttonswin... just event code + rctf flush; // rect to be flushed to frontbuffer + int handler; // for panels in other windows than buttonswin... just event code }; /* interface.c */ |