Add theme colors for view items
This commit is contained in:
parent
400d7235c3
commit
f17ea3da02
|
@ -1 +1 @@
|
|||
Subproject commit 050058417452bfba0cc9ae8692173eb02ac1ef3a
|
||||
Subproject commit 2d12637a69df7643484a8a3655b7eeb6faa170a7
|
|
@ -192,6 +192,15 @@ const bTheme U_theme_default = {
|
|||
.text_sel = RGBA(0xffffffff),
|
||||
.roundness = 0.2f,
|
||||
},
|
||||
.wcol_view_item = {
|
||||
.outline = RGBA(0x2d2d2dff),
|
||||
.inner = RGBA(0x4B4B4BFF),
|
||||
.inner_sel = RGBA(0x4772b3ff),
|
||||
.item = RGBA(0x4772b3ff),
|
||||
.text = RGBA(0xccccccff),
|
||||
.text_sel = RGBA(0xffffffff),
|
||||
.roundness = 0.2f,
|
||||
},
|
||||
.wcol_pie_menu = {
|
||||
.outline = RGBA(0x242424ff),
|
||||
.inner = RGBA(0x181818ff),
|
||||
|
|
|
@ -348,7 +348,9 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
|||
*/
|
||||
{
|
||||
/* Keep this block, even when empty. */
|
||||
/* TODO version bump. */
|
||||
btheme->space_assets = btheme->space_file;
|
||||
btheme->tui.wcol_view_item = U_theme_default.tui.wcol_view_item;
|
||||
}
|
||||
|
||||
#undef FROM_DEFAULT_V4_UCHAR
|
||||
|
|
|
@ -4572,10 +4572,12 @@ static uiWidgetType *widget_type(uiWidgetTypeEnum type)
|
|||
break;
|
||||
|
||||
case UI_WTYPE_TREEROW:
|
||||
wt.wcol_theme = &btheme->tui.wcol_view_item;
|
||||
wt.custom = widget_treerow;
|
||||
break;
|
||||
|
||||
case UI_WTYPE_GRID_TILE:
|
||||
wt.wcol_theme = &btheme->tui.wcol_view_item;
|
||||
wt.draw = widget_gridtile;
|
||||
break;
|
||||
|
||||
|
|
|
@ -161,6 +161,7 @@ typedef struct ThemeUI {
|
|||
uiWidgetColors wcol_num, wcol_numslider, wcol_tab;
|
||||
uiWidgetColors wcol_menu, wcol_pulldown, wcol_menu_back, wcol_menu_item, wcol_tooltip;
|
||||
uiWidgetColors wcol_box, wcol_scroll, wcol_progress, wcol_list_item, wcol_pie_menu;
|
||||
uiWidgetColors wcol_view_item;
|
||||
|
||||
uiWidgetStateColors wcol_state;
|
||||
|
||||
|
|
|
@ -1539,6 +1539,11 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(prop, "List Item Colors", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "wcol_view_item", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_ui_text(prop, "Data-View Item Colors", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "wcol_state", PROP_POINTER, PROP_NONE);
|
||||
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
||||
RNA_def_property_ui_text(prop, "State Colors", "");
|
||||
|
|
Loading…
Reference in New Issue