diff options
author | Ton Roosendaal <ton@blender.org> | 2009-07-02 15:23:19 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-07-02 15:23:19 +0400 |
commit | c7bd0d12484d7abf18f74c2ed8405ad6f5888d99 (patch) | |
tree | 1e321658448196aa52d668e17dc4757ee84a259a /source/blender/editors/interface/interface_widgets.c | |
parent | 421f44278cebff49a1485251f92a4277934c4e4c (diff) |
2.5
More toolbar functionality for workflow review.
- Split the region in two parts, bottom has the Tool Properties, the
top part shows 2 panels, one for python defined tools, other for a
"tool shelf" which (later) will get saved in files.
- Added a full context driven framework for this toolbar, showing
the tools depending on 3D window 'mode'. Both python defined tools
as the shelf respect this. So - for example - you will see different
tools in editmode mesh, as in vertex paint mode, etc.
- First template for the python tools will be committed after this commit;
it has placeholder tools to just show/test functioning.
NOTE: if you had saved a layout that shows tools region, open/close it
once to get the new region created for properties.
TODO:
- Moving paint properties to tool settings
- Test a layout with horizontal toolbar (without properties)
- Bring back floating panels, and put tool-properties here. (as option)
Diffstat (limited to 'source/blender/editors/interface/interface_widgets.c')
-rw-r--r-- | source/blender/editors/interface/interface_widgets.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/editors/interface/interface_widgets.c b/source/blender/editors/interface/interface_widgets.c index ed2d00cb00d..7a4ceec9593 100644 --- a/source/blender/editors/interface/interface_widgets.c +++ b/source/blender/editors/interface/interface_widgets.c @@ -293,13 +293,15 @@ static void round_box__edges(uiWidgetBase *wt, int roundboxalign, rcti *rect, fl float maxyi= maxy - 1.0f; float facxi= 1.0f/(maxxi-minxi); /* for uv */ float facyi= 1.0f/(maxyi-minyi); - int a, tot= 0; + int a, tot= 0, minsize; - if(2.0f*rad > rect->ymax-rect->ymin) - rad= 0.5f*(rect->ymax-rect->ymin); + minsize= MIN2(rect->xmax-rect->xmin, rect->ymax-rect->ymin); + + if(2.0f*rad > minsize) + rad= 0.5f*minsize; - if(2.0f*(radi+1.0f) > rect->ymax-rect->ymin) - radi= 0.5f*(rect->ymax-rect->ymin) - 1.0f; + if(2.0f*(radi+1.0f) > minsize) + radi= 0.5f*minsize - 1.0f; /* mult */ for(a=0; a<9; a++) { |