diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-15 15:19:59 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-05-15 15:19:59 +0400 |
commit | b4d46e5dedfa88951558a4f941d987a171594a0a (patch) | |
tree | 4de559356ab0ac6135f5a1abbbdb60eb1134ffca /source/blender/editors/space_text/text_ops.c | |
parent | 2df94626c483c9b522e347ecc792c634fdec420a (diff) |
UI: Layout Engine
* Buttons are now created first, and after that the layout is computed.
This means the layout engine now works at button level, and makes it
easier to write templates. Otherwise you had to store all info and
create the buttons later.
* Added interface_templates.c as a separate file to put templates in.
These can contain regular buttons, and can be put in a Free layout,
which means you can specify manual coordinates, but still get nested
correct inside other layouts.
* API was changed to allow better nesting. Previously items were added
in the last added layout specifier, i.e. one level up in the layout
hierarchy. This doesn't work well in always, so now when creating things
like rows or columns it always returns a layout which you have to add
the items in. All py scripts were updated to follow this.
* Computing the layout now goes in two passes, first estimating the
required width/height of all nested layouts, and then in the second
pass using the results of that to decide on the actual locations.
* Enum and array buttons now follow the direction of the layout, i.e.
they are vertical or horizontal depending if they are in a column or row.
* Color properties now get a color picker, and only get the additional
RGB sliders with Expand=True.
* File/directory string properties now get a button next to them for
opening the file browse, though this is not implemented yet.
* Layout items can now be aligned, set align=True when creating a column,
row, etc.
* Buttons now get a minimum width of one icon (avoids squashing icon
buttons).
* Moved some more space variables into Style.
Diffstat (limited to 'source/blender/editors/space_text/text_ops.c')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 913bd307ab2..5f974e7bcbb 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -2540,7 +2540,7 @@ static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *event) case 1: if(text->flags & TXT_ISDIRTY) { /* modified locally and externally, ahhh. offer more possibilites. */ - pup= uiPupMenuBegin("File Modified Outside and Inside Blender", 0); + pup= uiPupMenuBegin(C, "File Modified Outside and Inside Blender", 0); layout= uiPupMenuLayout(pup); uiItemEnumO(layout, "Reload from disk (ignore local changes)", 0, op->type->idname, "resolution", RESOLVE_RELOAD); uiItemEnumO(layout, "Save to disk (ignore outside changes)", 0, op->type->idname, "resolution", RESOLVE_SAVE); @@ -2548,7 +2548,7 @@ static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *event) uiPupMenuEnd(C, pup); } else { - pup= uiPupMenuBegin("File Modified Outside Blender", 0); + pup= uiPupMenuBegin(C, "File Modified Outside Blender", 0); layout= uiPupMenuLayout(pup); uiItemEnumO(layout, "Reload from disk", 0, op->type->idname, "resolution", RESOLVE_RELOAD); uiItemEnumO(layout, "Make text internal (separate copy)", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); @@ -2557,7 +2557,7 @@ static int resolve_conflict_invoke(bContext *C, wmOperator *op, wmEvent *event) } break; case 2: - pup= uiPupMenuBegin("File Deleted Outside Blender", 0); + pup= uiPupMenuBegin(C, "File Deleted Outside Blender", 0); layout= uiPupMenuLayout(pup); uiItemEnumO(layout, "Make text internal", 0, op->type->idname, "resolution", RESOLVE_MAKE_INTERNAL); uiItemEnumO(layout, "Recreate file", 0, op->type->idname, "resolution", RESOLVE_SAVE); |