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:
authorTon Roosendaal <ton@blender.org>2009-04-27 17:44:11 +0400
committerTon Roosendaal <ton@blender.org>2009-04-27 17:44:11 +0400
commit9b82d1474ff29a5ff246b53e75f12319a58bcdff (patch)
tree01e65fa09f6d6f06fade5a678f8f8061c407e653 /source/blender/editors/interface/interface_utils.c
parent1d3c2b83a1ef5bcd002d3279f130a2475e2c0181 (diff)
2.5
Summary of ain features: - Themes and Styles are now editable. - CTRL+U "Save user defaults" now goes to new .B25.blend, so you can use 2.4x and 2.5x next to each other. If B25 doesn't exist, it reads the regular .B.blend - Press Tkey in 3d window for (unfinished) toolbar WIP. It now only shows the last operator, if appropriate. Nkey properties moved to the other side. A lot of work was done on removing old themes for good and properly getting it work with the 2.5 region system. Here's some notes; - Buttons now all have a complete set of colors, based on button classifications (See outliner -> user prefs -> Interface - Theme colors have been extended with basic colors for region types. Currently colors are defined for Window, Header, List/Channels and for Button/Tool views. The screen manager handles this btw, so a TH_BACK will always pick the right backdrop color. - Menu backdrops are in in Button theme colors. Floating Panels will be in the per-space type Themes. - Styles were added in RNA too, but only for the font settings now. Only Panel font, widget font and widget-label work now. The 'group label' will be for templates mostly. Style settings will be expanded with spacing defaults, label conventions, etc. - Label text colors are stored in per-space Theme too, to make sure they fit. Same goes for Panel title color. Note that 'shadow' for fonts can conflict with text colors; shadow color is currently stored in Style... shadow code needs a bit of work still.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index 3bb7581b16c..67cca059d77 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -55,6 +55,8 @@
#include "WM_api.h"
#include "WM_types.h"
+#include "interface_intern.h"
+
#define DEF_BUT_WIDTH 150
#define DEF_ICON_BUT_WIDTH 20
#define DEF_BUT_HEIGHT 20
@@ -326,6 +328,45 @@ int uiDefAutoButsRNA(const bContext *C, uiBlock *block, PointerRNA *ptr)
return -y;
}
+/* temp call, single collumn, test for toolbar only */
+int uiDefAutoButsRNA_single(const bContext *C, uiBlock *block, PointerRNA *ptr)
+{
+ CollectionPropertyIterator iter;
+ PropertyRNA *iterprop, *prop;
+ uiLayout *layout;
+ char *name;
+ int x= 0, y= 0;
+
+ layout= uiLayoutBegin(UI_LAYOUT_VERTICAL, UI_LAYOUT_PANEL, x, y, block->panel->sizex, 20);
+
+ uiLayoutColumn(layout);
+ uiItemL(layout, (char*)RNA_struct_ui_name(ptr->type), 0);
+
+ iterprop= RNA_struct_iterator_property(ptr->type);
+ RNA_property_collection_begin(ptr, iterprop, &iter);
+
+ for(; iter.valid; RNA_property_collection_next(&iter)) {
+ prop= iter.ptr.data;
+
+ if(strcmp(RNA_property_identifier(prop), "rna_type") == 0)
+ continue;
+
+ uiLayoutSplit(layout, 1, 0);
+ uiLayoutColumn(uiLayoutSub(layout, 0));
+
+ name= (char*)RNA_property_ui_name(prop);
+ uiItemL(uiLayoutSub(layout, 0), name, 0);
+
+ uiItemFullR(uiLayoutSub(layout, 0), "", 0, ptr, prop, -1, 0, 0);
+ }
+
+ RNA_property_collection_end(&iter);
+ uiLayoutEnd(C, block, layout, &x, &y);
+
+ return -y;
+}
+
+
/***************************** ID Utilities *******************************/
typedef struct uiIDPoinParams {