* Fix buttons jumping around when resizing and zoom. Part of this was
  adding a tiny a 0.001f offset in UI_view2d_view_ortho, otherwise the
  rounding is unpredictable (used to be 0.375f, but that was disabled).
* Fix various issues with zooming, panning panels.  V2D_LOCKOFS_X/Y is
  now taken into account in more places in the view2d code, to avoid
  zooming into the center or panning out of the view.
* Remove "Free" align mode in buttons window (it's not really useful).

* View3D/Graph/Image editors now use the same PanelType system as the
  buttons window, means some deprecated panel code could be removed.
* Some small visual tweaks for panels.
* View 2D Reset operator (Home key), to reset zoom and panning for panels.

* Added argument to set number buttons as sliders (slider=True for itemR).
* Ignore labels for button alignment (doesn't look right).
* Fix some use of context.main in py scripts, should get data from active
  object instead.
* Fix autotexspace -> auto_texspace in py script.
This commit is contained in:
2009-05-19 17:13:33 +00:00
parent 861398542f
commit 40ae17d2f6
42 changed files with 933 additions and 1104 deletions

View File

@@ -315,16 +315,12 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
return but;
}
int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
void uiDefAutoButsRNA(const bContext *C, uiLayout *layout, PointerRNA *ptr)
{
uiStyle *style= U.uistyles.first;
CollectionPropertyIterator iter;
PropertyRNA *iterprop, *prop;
uiLayout *layout, *split;
uiLayout *split;
char *name;
int x= 0, y= 0;
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y, DEF_BUT_WIDTH*2, 20, style);
uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
@@ -342,26 +338,19 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
name= (char*)RNA_property_ui_name(prop);
uiItemL(uiLayoutColumn(split, 0), name, 0);
uiItemFullR(uiLayoutColumn(split, 0), "", 0, ptr, prop, -1, 0, 0);
uiItemFullR(uiLayoutColumn(split, 0), "", 0, ptr, prop, -1, 0, 0, 0);
}
RNA_property_collection_end(&iter);
uiBlockLayoutResolve(C, block, &x, &y);
return -y;
}
/* temp call, single collumn, test for toolbar only */
int uiDefAutoButsRNA_single(const bContext *C, uiBlock *block, PointerRNA *ptr)
void uiDefAutoButsRNA_single(const bContext *C, uiLayout *layout, PointerRNA *ptr)
{
uiStyle *style= U.uistyles.first;
CollectionPropertyIterator iter;
PropertyRNA *iterprop, *prop;
uiLayout *layout;
uiLayout *col;
char *name;
int x= 0, y= 0;
layout= uiBlockLayout(block, UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y, block->panel->sizex, 20, style);
uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
@@ -375,17 +364,14 @@ int uiDefAutoButsRNA_single(const bContext *C, uiBlock *block, PointerRNA *ptr)
continue;
name= (char*)RNA_property_ui_name(prop);
uiItemL(layout, name, 0);
uiItemFullR(layout, "", 0, ptr, prop, -1, 0, 0);
col= uiLayoutColumn(layout, 1);
uiItemL(col, name, 0);
uiItemFullR(col, "", 0, ptr, prop, -1, 0, 0, 0);
}
RNA_property_collection_end(&iter);
uiBlockLayoutResolve(C, block, &x, &y);
return -y;
}
/***************************** ID Utilities *******************************/
typedef struct uiIDPoinParams {