* Add theme option to show panel header background.
* Draw panel collapse widget a bit smaller.
* Add theme option to draw icons muted.
* Code tweak: replace U.themes.first by UI_GetTheme() calls.
This commit is contained in:
Brecht Van Lommel 2011-11-19 20:57:53 +00:00
parent 807a76d943
commit 7217518179
15 changed files with 155 additions and 75 deletions

@ -634,12 +634,51 @@ class USERPREF_PT_theme(Panel):
colsub.row().prop(ui, "inner_key_sel")
colsub.row().prop(ui, "blend")
ui = theme.user_interface
col.separator()
col.separator()
split = col.split(percentage=0.93)
split.prop(ui, "icon_file")
ui = theme.user_interface
col.label("Icons:")
row = col.row()
subsplit = row.split(percentage=0.95)
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
colsub.row().prop(ui, "icon_file")
subsplit = row.split(percentage=0.85)
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
colsub.row().prop(ui, "icon_alpha")
col.separator()
col.separator()
ui = theme.user_interface.panel
col.label("Panels:")
row = col.row()
subsplit = row.split(percentage=0.95)
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
rowsub = colsub.row()
rowsub.prop(ui, "show_header")
rowsub.label()
subsplit = row.split(percentage=0.85)
padding = subsplit.split(percentage=0.15)
colsub = padding.column()
colsub = padding.column()
colsub.row().prop(ui, "header")
layout.separator()
layout.separator()

@ -42,7 +42,7 @@ extern "C" {
* and keep comment above the defines.
* Use STRINGIFY() rather than defining with quotes */
#define BLENDER_VERSION 260
#define BLENDER_SUBVERSION 4
#define BLENDER_SUBVERSION 5
#define BLENDER_MINVERSION 250
#define BLENDER_MINSUBVERSION 0

@ -318,6 +318,9 @@ void UI_ThemeClearColor(int colorid);
// internal (blender) usage only, for init and set active
void UI_SetTheme(int spacetype, int regionid);
// get current theme
struct bTheme *UI_GetTheme(void);
/* only for buttons in theme editor! */
const unsigned char *UI_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);

@ -506,7 +506,7 @@ static void init_brush_icons(void)
static void init_internal_icons(void)
{
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
ImBuf *bbuf= NULL;
int x, y, icontype;
char iconfilestr[FILE_MAXDIR+FILE_MAXFILE];
@ -950,6 +950,7 @@ static int get_draw_size(enum eIconSizes size)
static void icon_draw_size(float x, float y, int icon_id, float aspect, float alpha, float *rgb, enum eIconSizes size, int draw_size, int UNUSED(nocreate), short is_preview)
{
bTheme *btheme= UI_GetTheme();
Icon *icon = NULL;
DrawInfo *di = NULL;
IconImage *iimg;
@ -957,6 +958,7 @@ static void icon_draw_size(float x, float y, int icon_id, float aspect, float al
int w, h;
icon = BKE_icon_get(icon_id);
alpha *= btheme->tui.icon_alpha;
if (icon==NULL) {
if (G.f & G_DEBUG)

@ -112,7 +112,7 @@ typedef enum {
/* internal panel drawing defines */
#define PNL_GRID (UI_UNIT_Y / 5) /* 4 default */
#define PNL_HEADER UI_UNIT_Y /* 20 default */
#define PNL_HEADER (UI_UNIT_Y + 4) /* 24 default */
/* panel->flag */
#define PNL_SELECT 1

@ -59,6 +59,7 @@
#include "ED_screen.h"
#include "UI_interface.h"
#include "UI_resources.h"
#include "interface_intern.h"
@ -173,7 +174,6 @@ static void ui_panel_copy_offset(Panel *pa, Panel *papar)
Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int *open)
{
uiStyle *style= UI_GetStyle();
Panel *pa, *patab, *palast, *panext;
char *drawname= pt->label;
char *idname= pt->idname;
@ -208,7 +208,7 @@ Panel *uiBeginPanel(ScrArea *sa, ARegion *ar, uiBlock *block, PanelType *pt, int
}
pa->ofsx= 0;
pa->ofsy= style->panelouter;
pa->ofsy= 0;
pa->sizex= 0;
pa->sizey= 0;
pa->runtime_flag |= PNL_NEW_ADDED;
@ -482,6 +482,7 @@ static void rectf_scale(rctf *rect, float scale)
/* panel integrated in buttonswindow, tool/property lists etc */
void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
{
bTheme *btheme= UI_GetTheme();
Panel *panel= block->panel;
rcti headrect;
rctf itemrect;
@ -493,19 +494,37 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
/* calculate header rect */
/* + 0.001f to prevent flicker due to float inaccuracy */
headrect= *rect;
headrect.ymin= headrect.ymax;
headrect.ymin= headrect.ymax - 2.0f/block->aspect;
headrect.ymax= headrect.ymin + floor(PNL_HEADER/block->aspect + 0.001f);
if(!(panel->runtime_flag & PNL_FIRST)) {
float minx= rect->xmin+5.0f/block->aspect;
float maxx= rect->xmax-5.0f/block->aspect;
{
float minx= rect->xmin;
float maxx= rect->xmax;
float y= headrect.ymax;
glEnable(GL_BLEND);
glColor4f(0.0f, 0.0f, 0.0f, 0.5f);
fdrawline(minx, y+1, maxx, y+1);
glColor4f(1.0f, 1.0f, 1.0f, 0.25f);
fdrawline(minx, y, maxx, y);
if(btheme->tui.panel.show_header) {
/* draw with background color */
glEnable(GL_BLEND);
glColor4ubv((unsigned char*)btheme->tui.panel.header);
glRectf(minx, headrect.ymin, maxx, y);
fdrawline(minx, y, maxx, y);
fdrawline(minx, y, maxx, y);
}
else if(!(panel->runtime_flag & PNL_FIRST)) {
/* draw embossed separator */
minx += 5.0f/block->aspect;
maxx -= 5.0f/block->aspect;
glColor4f(0.0f, 0.0f, 0.0f, 0.5f);
fdrawline(minx, y+1, maxx, y+1);
glColor4f(1.0f, 1.0f, 1.0f, 0.25f);
fdrawline(minx, y, maxx, y);
glDisable(GL_BLEND);
}
glDisable(GL_BLEND);
}
@ -518,7 +537,8 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
itemrect.xmin= itemrect.xmax - (headrect.ymax-headrect.ymin);
itemrect.ymin= headrect.ymin;
itemrect.ymax= headrect.ymax;
rectf_scale(&itemrect, 0.8f);
rectf_scale(&itemrect, 0.7f);
ui_draw_panel_dragwidget(&itemrect);
}
@ -538,7 +558,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
/* in some occasions, draw a border */
if(panel->flag & PNL_SELECT) {
if(panel->control & UI_PNL_SOLID) uiSetRoundBox(UI_CNR_ALL);
else uiSetRoundBox(UI_CNR_TOP_LEFT | UI_CNR_TOP_RIGHT);
else uiSetRoundBox(UI_CNR_NONE);
UI_ThemeColorShade(TH_BACK, -120);
uiRoundRect(0.5f + rect->xmin, 0.5f + rect->ymin, 0.5f + rect->xmax, 0.5f + headrect.ymax+1, 8);
@ -567,7 +587,7 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, rcti *rect)
itemrect.ymin= headrect.ymin;
itemrect.ymax= headrect.ymax;
rectf_scale(&itemrect, 0.5f);
rectf_scale(&itemrect, 0.35f);
if(panel->flag & PNL_CLOSEDY)
ui_draw_tria_rect(&itemrect, 'h');
@ -589,12 +609,12 @@ static int get_panel_header(Panel *pa)
return PNL_HEADER;
}
static int get_panel_size_y(uiStyle *style, Panel *pa)
static int get_panel_size_y(Panel *pa)
{
if(pa->type && (pa->type->flag & PNL_NO_HEADER))
return pa->sizey;
return PNL_HEADER + pa->sizey + style->panelouter;
return PNL_HEADER + pa->sizey;
}
/* this function is needed because uiBlock and Panel itself dont
@ -667,7 +687,6 @@ static int compare_panel(const void *a1, const void *a2)
/* returns 1 when it did something */
static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
{
uiStyle *style= UI_GetStyle();
Panel *pa;
PanelSort *ps, *panelsort, *psnext;
int a, tot=0, done;
@ -719,18 +738,18 @@ static int uiAlignPanelStep(ScrArea *sa, ARegion *ar, float fac, int drag)
/* no smart other default start loc! this keeps switching f5/f6/etc compatible */
ps= panelsort;
ps->pa->ofsx= 0;
ps->pa->ofsy= -get_panel_size_y(style, ps->pa);
ps->pa->ofsy= -get_panel_size_y(ps->pa);
for(a=0; a<tot-1; a++, ps++) {
psnext= ps+1;
if(align==BUT_VERTICAL) {
psnext->pa->ofsx= ps->pa->ofsx;
psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(style, psnext->pa);
psnext->pa->ofsy= get_panel_real_ofsy(ps->pa) - get_panel_size_y(psnext->pa);
}
else {
psnext->pa->ofsx= get_panel_real_ofsx(ps->pa);
psnext->pa->ofsy= ps->pa->ofsy + get_panel_size_y(style, ps->pa) - get_panel_size_y(style, psnext->pa);
psnext->pa->ofsy= ps->pa->ofsy + get_panel_size_y(ps->pa) - get_panel_size_y(psnext->pa);
}
}

@ -124,7 +124,6 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name, short uifont_id
style->buttonspacex= 8;
style->buttonspacey= 2;
style->panelspace= 8;
style->panelouter= 4;
return style;
}

@ -1617,7 +1617,7 @@ static void widget_state_option_menu(uiWidgetType *wt, int state)
if(state & UI_SELECT)
UI_GetThemeColor4ubv(TH_TEXT_HI, (unsigned char *)wt->wcol.text);
else {
bTheme *btheme= U.themes.first; /* XXX */
bTheme *btheme= UI_GetTheme(); /* XXX */
copy_v3_v3_char(wt->wcol.text, btheme->tui.wcol_menu_back.text);
}
@ -2760,7 +2760,7 @@ static void widget_disabled(rcti *rect)
static uiWidgetType *widget_type(uiWidgetTypeEnum type)
{
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
static uiWidgetType wt;
/* defaults */
@ -2945,7 +2945,7 @@ static int widget_roundbox_set(uiBut *but, rcti *rect)
/* conversion from old to new buttons, so still messy */
void ui_draw_but(const bContext *C, ARegion *ar, uiStyle *style, uiBut *but, rcti *rect)
{
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
ThemeUI *tui= &btheme->tui;
uiFontStyle *fstyle= &style->widget;
uiWidgetType *wt= NULL;

@ -839,6 +839,11 @@ void UI_SetTheme(int spacetype, int regionid)
}
}
bTheme *UI_GetTheme()
{
return U.themes.first;
}
// for space windows only
void UI_ThemeColor(int colorid)
{
@ -1668,6 +1673,15 @@ void init_userdef_do_versions(void)
}
}
if (bmain->versionfile < 260 || (bmain->versionfile == 260 && bmain->subversionfile < 5)) {
bTheme *btheme;
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
SETCOL(btheme->tui.panel.header, 0, 0, 0, 25);
btheme->tui.icon_alpha= 1.0;
}
}
/* GL Texture Garbage Collection (variable abused above!) */
if (U.textimeout == 0) {
U.texcollectrate = 60;

@ -1558,7 +1558,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
if (scroll & V2D_SCROLL_HORIZONTAL) {
/* only draw scrollbar when it doesn't fill the entire space */
if(vs->horfull==0) {
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
uiWidgetColors wcol= btheme->tui.wcol_scroll;
rcti slider;
int state;
@ -1669,7 +1669,7 @@ void UI_view2d_scrollers_draw(const bContext *C, View2D *v2d, View2DScrollers *v
if (scroll & V2D_SCROLL_VERTICAL) {
/* only draw scrollbar when it doesn't fill the entire space */
if(vs->vertfull==0) {
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
uiWidgetColors wcol= btheme->tui.wcol_scroll;
rcti slider;
int state;

@ -1481,7 +1481,7 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
}
x= 0;
y= -style->panelouter;
y= 0;
/* create panels */
uiBeginPanels(C, ar);
@ -1553,11 +1553,11 @@ void ED_region_panels(const bContext *C, ARegion *ar, int vertical, const char *
if(pt->flag & PNL_NO_HEADER)
y += yco;
else
y += yco-style->panelouter;
y += yco;
}
else {
x += w;
miny= MIN2(y, yco-style->panelouter-header);
miny= MIN2(y, yco-header);
}
}
}

@ -1179,7 +1179,7 @@ static void calc_text_rcts(SpaceText *st, ARegion *ar, rcti *scroll, rcti *back)
static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back)
{
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
uiWidgetColors wcol= btheme->tui.wcol_scroll;
unsigned char col[4];
float rad;

@ -115,7 +115,7 @@ static void set_pchan_colorset (Object *ob, bPoseChannel *pchan)
* color set (based on the theme colors for 3d-view) is used.
*/
if (color_index > 0) {
bTheme *btheme= U.themes.first;
bTheme *btheme= UI_GetTheme();
bcolor= &btheme->tarm[(color_index - 1)];
}
else if (color_index == -1) {

@ -112,9 +112,8 @@ typedef struct uiStyle {
short buttonspacex;
short buttonspacey;
short panelspace;
short panelouter;
short pad[1];
short pad[2];
} uiStyle;
typedef struct uiWidgetColors {
@ -139,6 +138,12 @@ typedef struct uiWidgetStateColors {
float blend, pad;
} uiWidgetStateColors;
typedef struct uiPanelColors {
char header[4];
short show_header;
short pad;
} uiPanelColors;
typedef struct ThemeUI {
/* Interface Elements (buttons, menus, icons) */
@ -149,9 +154,13 @@ typedef struct ThemeUI {
uiWidgetColors wcol_box, wcol_scroll, wcol_progress, wcol_list_item;
uiWidgetStateColors wcol_state;
uiPanelColors panel;
char iconfile[80]; // FILE_MAXFILE length
float icon_alpha;
float pad;
} ThemeUI;
/* try to put them all in one, if needed a special struct can be created as well

@ -506,6 +506,25 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
srna= RNA_def_struct(brna, "ThemePanelColors", NULL);
RNA_def_struct_sdna(srna, "uiPanelColors");
RNA_def_struct_clear_flag(srna, STRUCT_UNDO);
RNA_def_struct_ui_text(srna, "Theme Panel Color", "Theme settings for panel colors");
prop= RNA_def_property(srna, "header", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_ui_text(prop, "Header", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "show_header", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_ui_text(prop, "Show Header", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_ui(BlenderRNA *brna)
{
StructRNA *srna;
@ -513,6 +532,7 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
rna_def_userdef_theme_ui_wcol(brna);
rna_def_userdef_theme_ui_wcol_state(brna);
rna_def_userdef_theme_ui_panel(brna);
srna= RNA_def_struct(brna, "ThemeUserInterface", NULL);
RNA_def_struct_sdna(srna, "ThemeUI");
@ -521,127 +541,102 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
prop= RNA_def_property(srna, "wcol_regular", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_regular");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Regular Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_tool", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_tool");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Tool Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_radio", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_radio");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Radio Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_text", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_text");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Text Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_option", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_option");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Option Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_toggle", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_toggle");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Toggle Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_num", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_num");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Number Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_numslider", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_numslider");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Slider Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_box", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_box");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Box Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_pulldown", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_pulldown");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Pulldown Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu_back", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_back");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Backdrop Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_menu_item", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_menu_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Menu Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_scroll", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_scroll");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Scroll Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_progress", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_progress");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "Progress Bar Widget Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_list_item", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_list_item");
RNA_def_property_struct_type(prop, "ThemeWidgetColors");
RNA_def_property_ui_text(prop, "List Item Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_pointer_sdna(prop, NULL, "wcol_state");
RNA_def_property_struct_type(prop, "ThemeWidgetStateColors");
RNA_def_property_ui_text(prop, "State Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "panel", PROP_POINTER, PROP_NONE);
RNA_def_property_flag(prop, PROP_NEVER_NULL);
RNA_def_property_ui_text(prop, "Panel Colors", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "icon_file", PROP_STRING, PROP_FILEPATH);
RNA_def_property_string_sdna(prop, NULL, "iconfile");
RNA_def_property_ui_text(prop, "Icon File", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop= RNA_def_property(srna, "icon_alpha", PROP_FLOAT, PROP_FACTOR);
RNA_def_property_ui_text(prop, "Icon Alpha", "Transparency of icons in the interface, to reduce contrast");
RNA_def_property_update(prop, 0, "rna_userdef_update");
}
static void rna_def_userdef_theme_spaces_main(StructRNA *srna, int spacetype)