UI: Theme: Add global style for panel colors
Move panel header, panel background, and sub-panel background color settings to be global, under `User Interface`, like other widgets. Remove per-editor panel styling. This way users can edit the panel colors once, and affect all panels. See pull request for screenshots and details. Pull Request: https://projects.blender.org/blender/blender/pulls/140295
This commit is contained in:
committed by
Pablo Vazquez
parent
283666675c
commit
7818082d02
@@ -268,6 +268,9 @@ const bTheme U_theme_default = {
|
||||
.icon_folder = RGBA(0xccad63ff),
|
||||
.icon_autokey = RGBA(0xab3c48ff),
|
||||
.panel_roundness = 0.4f,
|
||||
.panel_header = RGBA(0x3d3d3dff),
|
||||
.panel_back = RGBA(0x3d3d3dff),
|
||||
.panel_sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.space_properties = {
|
||||
.back = RGBA(0x30303000),
|
||||
@@ -284,11 +287,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x1d1d1dff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.active = RGBA(0x4772b3ff),
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
@@ -311,11 +309,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.asset_shelf = {
|
||||
.header_back = RGBA(0x1d1d1dff),
|
||||
.back = RGBA(0x303030ff),
|
||||
@@ -411,11 +404,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x303030ff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.hilite = RGBA(0x4772b3ff),
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
@@ -441,11 +429,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade1 = RGBA(0x96969600),
|
||||
.shade2 = RGBA(0x12121264),
|
||||
.grid = RGBA(0x1a1a1aff),
|
||||
@@ -491,11 +474,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
@@ -530,11 +508,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade1 = RGBA(0xc0c0c000),
|
||||
.shade2 = RGBA(0x1d1d1d99),
|
||||
.hilite = RGBA(0x60c04044),
|
||||
@@ -592,11 +565,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade1 = RGBA(0x96969600),
|
||||
.grid = RGBA(0x2a2a2aff),
|
||||
.strip = RGBA(0x0d0d0d80),
|
||||
@@ -645,11 +613,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade1 = RGBA(0xa0a0a000),
|
||||
.grid = RGBA(0x303030ff),
|
||||
.vertex_select = RGBA(0xff8500ff),
|
||||
@@ -713,11 +676,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.asset_shelf = {
|
||||
.header_back = RGBA(0x1d1d1dff),
|
||||
.back = RGBA(0x303030ff),
|
||||
@@ -771,11 +729,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade2 = RGBA(0x4d4d4de6),
|
||||
.hilite = RGBA(0x71a8ffff),
|
||||
.grid = RGBA(0x1d1d1dff),
|
||||
@@ -807,11 +760,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.active = RGBA(0x334d80ff),
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
@@ -842,11 +790,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.shade2 = RGBA(0x7f7f7f64),
|
||||
.grid = RGBA(0x28282800),
|
||||
.wire = RGBA(0x1a1a1aff),
|
||||
@@ -902,11 +845,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x303030ff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
@@ -926,11 +864,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.console_output = RGBA(0x71a8ffff),
|
||||
.console_input = RGBA(0xf2f2f2ff),
|
||||
.console_info = RGBA(0x95d600ff),
|
||||
@@ -960,11 +893,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.grid = RGBA(0x181818ff),
|
||||
.strip = RGBA(0xffffff80),
|
||||
.strip_select = RGBA(0xff8c00ff),
|
||||
@@ -1011,11 +939,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
@@ -1035,11 +958,6 @@ const bTheme U_theme_default = {
|
||||
.button_text_hi = RGBA(0xffffffff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.vertex_size = 3,
|
||||
.outline_width = 1,
|
||||
.facedot_size = 4,
|
||||
@@ -1064,11 +982,6 @@ const bTheme U_theme_default = {
|
||||
.list_text_hi = RGBA(0xffaf23ff),
|
||||
.navigation_bar = RGBA(0x1d1d1dff),
|
||||
.execution_buts = RGBA(0x303030ff),
|
||||
.panelcolors = {
|
||||
.header = RGBA(0x3d3d3dff),
|
||||
.back = RGBA(0x3d3d3dff),
|
||||
.sub_back = RGBA(0x0000001f),
|
||||
},
|
||||
.hilite = RGBA(0x80808080),
|
||||
.active = RGBA(0x3b5689ff),
|
||||
.vertex_size = 3,
|
||||
|
||||
@@ -12,6 +12,9 @@
|
||||
editor_outline_active="#ccccccff"
|
||||
widget_text_cursor="#3399e6"
|
||||
panel_roundness="0.4"
|
||||
panel_header="#ccccccff"
|
||||
panel_back="#ccccccff"
|
||||
panel_sub_back="#0000001f"
|
||||
transparent_checker_primary="#333333"
|
||||
transparent_checker_secondary="#262626"
|
||||
transparent_checker_size="8"
|
||||
@@ -480,14 +483,6 @@
|
||||
>
|
||||
</ThemeGradientColors>
|
||||
</gradients>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGradient>
|
||||
</space>
|
||||
<asset_shelf>
|
||||
@@ -551,14 +546,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -594,14 +581,6 @@
|
||||
execution_buts="#999999e6"
|
||||
tab_back="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeFileBrowser>
|
||||
@@ -650,14 +629,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -725,14 +696,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -809,14 +772,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#656565ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<asset_shelf>
|
||||
@@ -885,14 +840,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#656565ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -928,14 +875,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeProperties>
|
||||
@@ -972,14 +911,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeTextEditor>
|
||||
@@ -1037,14 +968,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#656565ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -1085,14 +1008,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeOutliner>
|
||||
@@ -1128,14 +1043,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeInfo>
|
||||
@@ -1159,14 +1066,6 @@
|
||||
execution_buts="#b3b3b3ff"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemePreferences>
|
||||
@@ -1197,14 +1096,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeConsole>
|
||||
@@ -1260,14 +1151,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#404040ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
@@ -1300,14 +1183,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#28292dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeTopBar>
|
||||
@@ -1331,14 +1206,6 @@
|
||||
execution_buts="#00000000"
|
||||
tab_back="#28292dff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
</ThemeStatusBar>
|
||||
@@ -1364,14 +1231,6 @@
|
||||
execution_buts="#999999e6"
|
||||
tab_back="#999999ff"
|
||||
>
|
||||
<panelcolors>
|
||||
<ThemePanelColors
|
||||
header="#ccccccff"
|
||||
back="#ccccccff"
|
||||
sub_back="#0000000f"
|
||||
>
|
||||
</ThemePanelColors>
|
||||
</panelcolors>
|
||||
</ThemeSpaceGeneric>
|
||||
</space>
|
||||
<space_list>
|
||||
|
||||
@@ -968,7 +968,6 @@ class USERPREF_MT_interface_theme_presets(Menu):
|
||||
"ThemeNLAEditor",
|
||||
"ThemeNodeEditor",
|
||||
"ThemeOutliner",
|
||||
"ThemePanelColors",
|
||||
"ThemePreferences",
|
||||
"ThemeProperties",
|
||||
"ThemeSequenceEditor",
|
||||
@@ -1106,6 +1105,28 @@ class PreferenceThemeWidgetShadePanel:
|
||||
self.layout.prop(widget_style, "show_shaded", text="")
|
||||
|
||||
|
||||
class USERPREF_PT_theme_interface_panel(ThemePanel, CenterAlignMixIn, Panel):
|
||||
bl_label = "Panel"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
bl_parent_id = "USERPREF_PT_theme_user_interface"
|
||||
|
||||
def draw_centered(self, context, layout):
|
||||
theme = context.preferences.themes[0]
|
||||
ui = theme.user_interface
|
||||
|
||||
flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False)
|
||||
|
||||
col = flow.column()
|
||||
col.prop(ui, "panel_header", text="Header")
|
||||
|
||||
col = flow.column(align=True)
|
||||
col.prop(ui, "panel_back", text="Background")
|
||||
col.prop(ui, "panel_sub_back", text="Sub-Panel")
|
||||
|
||||
col = flow.column()
|
||||
col.prop(ui, "panel_roundness", text="Roundness")
|
||||
|
||||
|
||||
class USERPREF_PT_theme_interface_state(ThemePanel, CenterAlignMixIn, Panel):
|
||||
bl_label = "State"
|
||||
bl_options = {'DEFAULT_CLOSED'}
|
||||
@@ -1177,7 +1198,6 @@ class USERPREF_PT_theme_interface_styles(ThemePanel, CenterAlignMixIn, Panel):
|
||||
|
||||
col = flow.column()
|
||||
col.prop(ui, "widget_emboss")
|
||||
col.prop(ui, "panel_roundness")
|
||||
|
||||
|
||||
class USERPREF_PT_theme_interface_transparent_checker(ThemePanel, CenterAlignMixIn, Panel):
|
||||
@@ -2971,6 +2991,7 @@ classes = (
|
||||
|
||||
USERPREF_MT_interface_theme_presets,
|
||||
USERPREF_PT_theme,
|
||||
USERPREF_PT_theme_interface_panel,
|
||||
USERPREF_PT_theme_interface_gizmos,
|
||||
USERPREF_PT_theme_interface_icons,
|
||||
USERPREF_PT_theme_interface_state,
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 8
|
||||
#define BLENDER_FILE_SUBVERSION 9
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -294,6 +294,12 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
||||
U_theme_default.tui.wcol_tooltip.outline);
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(500, 9)) {
|
||||
copy_v4_v4_uchar(btheme->tui.panel_header, U_theme_default.tui.panel_header);
|
||||
copy_v4_v4_uchar(btheme->tui.panel_back, U_theme_default.tui.panel_back);
|
||||
copy_v4_v4_uchar(btheme->tui.panel_sub_back, U_theme_default.tui.panel_sub_back);
|
||||
}
|
||||
|
||||
/**
|
||||
* Always bump subversion in BKE_blender_version.h when adding versioning
|
||||
* code here, and wrap it inside a USER_VERSION_ATLEAST check.
|
||||
|
||||
@@ -272,13 +272,13 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
break;
|
||||
|
||||
case TH_PANEL_HEADER:
|
||||
cp = ts->panelcolors.header;
|
||||
cp = btheme->tui.panel_header;
|
||||
break;
|
||||
case TH_PANEL_BACK:
|
||||
cp = ts->panelcolors.back;
|
||||
cp = btheme->tui.panel_back;
|
||||
break;
|
||||
case TH_PANEL_SUB_BACK:
|
||||
cp = ts->panelcolors.sub_back;
|
||||
cp = btheme->tui.panel_sub_back;
|
||||
break;
|
||||
|
||||
case TH_BUTBACK:
|
||||
|
||||
@@ -139,13 +139,6 @@ typedef struct uiWidgetStateColors {
|
||||
char _pad0[4];
|
||||
} uiWidgetStateColors;
|
||||
|
||||
typedef struct uiPanelColors {
|
||||
unsigned char header[4];
|
||||
unsigned char back[4];
|
||||
unsigned char sub_back[4];
|
||||
char _pad0[4];
|
||||
} uiPanelColors;
|
||||
|
||||
typedef struct ThemeUI {
|
||||
/* Interface Elements (buttons, menus, icons) */
|
||||
uiWidgetColors wcol_regular, wcol_tool, wcol_toolbar_item, wcol_text;
|
||||
@@ -207,8 +200,11 @@ typedef struct ThemeUI {
|
||||
/** Intensity of the border icons. >0 will render an border around themed
|
||||
* icons. */
|
||||
float icon_border_intensity;
|
||||
/* Panels. */
|
||||
float panel_roundness;
|
||||
char _pad2[4];
|
||||
unsigned char panel_header[4];
|
||||
unsigned char panel_back[4];
|
||||
unsigned char panel_sub_back[4];
|
||||
|
||||
} ThemeUI;
|
||||
|
||||
@@ -267,9 +263,6 @@ typedef struct ThemeSpace {
|
||||
/** Region background. */
|
||||
unsigned char execution_buts[4];
|
||||
|
||||
/* NOTE: cannot use name 'panel' because of DNA mapping old files. */
|
||||
uiPanelColors panelcolors;
|
||||
|
||||
ThemeAssetShelf asset_shelf;
|
||||
|
||||
unsigned char shade1[4];
|
||||
|
||||
@@ -1743,28 +1743,6 @@ static void rna_def_userdef_theme_ui_wcol_state(BlenderRNA *brna)
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_ui_panel(BlenderRNA *brna)
|
||||
{
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
|
||||
srna = RNA_def_struct(brna, "ThemePanelColors", nullptr);
|
||||
RNA_def_struct_sdna(srna, "uiPanelColors");
|
||||
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_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "back", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Background", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "sub_back", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Sub Background", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
}
|
||||
|
||||
static const EnumPropertyItem rna_enum_userdef_theme_background_types_items[] = {
|
||||
{TH_BACKGROUND_SINGLE_COLOR,
|
||||
"SINGLE_COLOR",
|
||||
@@ -1821,7 +1799,6 @@ 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);
|
||||
rna_def_userdef_theme_ui_gradient(brna);
|
||||
|
||||
srna = RNA_def_struct(brna, "ThemeUserInterface", nullptr);
|
||||
@@ -1994,6 +1971,18 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
|
||||
RNA_def_property_float_default(prop, 0.4f);
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "panel_header", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Panel Header", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "panel_back", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Panel Background", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "panel_sub_back", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_ui_text(prop, "Sub-Panel Background", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
/* Transparent Grid */
|
||||
prop = RNA_def_property(srna, "transparent_checker_primary", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "transparent_checker_primary");
|
||||
@@ -2165,12 +2154,6 @@ static void rna_def_userdef_theme_space_common(StructRNA *srna)
|
||||
RNA_def_property_ui_text(prop, "Header Text Highlight", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
/* panel settings */
|
||||
prop = RNA_def_property(srna, "panelcolors", 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_theme_update");
|
||||
|
||||
/* buttons */
|
||||
// if (!ELEM(spacetype, SPACE_PROPERTIES, SPACE_OUTLINER)) {
|
||||
prop = RNA_def_property(srna, "button", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
|
||||
Reference in New Issue
Block a user