Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_panel.c
| Show First 20 Lines • Show All 1,412 Lines • ▼ Show 20 Lines | #endif | ||||
| int y_ofs = tab_v_pad; | int y_ofs = tab_v_pad; | ||||
| /* Primary theme colors */ | /* Primary theme colors */ | ||||
| unsigned char theme_col_back[4]; | unsigned char theme_col_back[4]; | ||||
| unsigned char theme_col_text[4]; | unsigned char theme_col_text[4]; | ||||
| unsigned char theme_col_text_hi[4]; | unsigned char theme_col_text_hi[4]; | ||||
| /* Secondary theme colors */ | /* Tab colors */ | ||||
| unsigned char theme_col_tab_bg[4]; | unsigned char theme_col_tab_bg[4]; | ||||
| unsigned char theme_col_tab_active[4]; | |||||
| unsigned char theme_col_tab_inactive[4]; | unsigned char theme_col_tab_inactive[4]; | ||||
| /* Secondary theme colors */ | |||||
| unsigned char theme_col_tab_outline[4]; | unsigned char theme_col_tab_outline[4]; | ||||
| unsigned char theme_col_tab_divider[4]; /* line that divides tabs from the main area */ | unsigned char theme_col_tab_divider[4]; /* line that divides tabs from the main area */ | ||||
| unsigned char theme_col_tab_highlight[4]; | unsigned char theme_col_tab_highlight[4]; | ||||
| unsigned char theme_col_tab_highlight_inactive[4]; | unsigned char theme_col_tab_highlight_inactive[4]; | ||||
| UI_GetThemeColor4ubv(TH_BACK, theme_col_back); | UI_GetThemeColor4ubv(TH_BACK, theme_col_back); | ||||
| UI_GetThemeColor4ubv(TH_TEXT, theme_col_text); | UI_GetThemeColor4ubv(TH_TEXT, theme_col_text); | ||||
| UI_GetThemeColor4ubv(TH_TEXT_HI, theme_col_text_hi); | UI_GetThemeColor4ubv(TH_TEXT_HI, theme_col_text_hi); | ||||
| blend_color_interpolate_byte(theme_col_tab_bg, theme_col_back, theme_col_text, 0.2f); | UI_GetThemeColor4ubv(TH_TAB_BACK, theme_col_tab_bg); | ||||
| blend_color_interpolate_byte(theme_col_tab_inactive, theme_col_back, theme_col_text, 0.10f); | UI_GetThemeColor4ubv(TH_TAB_ACTIVE, theme_col_tab_active); | ||||
| blend_color_interpolate_byte(theme_col_tab_outline, theme_col_back, theme_col_text, 0.3f); | UI_GetThemeColor4ubv(TH_TAB_INACTIVE, theme_col_tab_inactive); | ||||
| blend_color_interpolate_byte(theme_col_tab_divider, theme_col_back, theme_col_text, 0.3f); | UI_GetThemeColor4ubv(TH_TAB_OUTLINE, theme_col_tab_outline); | ||||
| blend_color_interpolate_byte(theme_col_tab_divider, theme_col_back, theme_col_text, 0.3f); | |||||
| blend_color_interpolate_byte(theme_col_tab_highlight, theme_col_back, theme_col_text_hi, 0.2f); | blend_color_interpolate_byte(theme_col_tab_highlight, theme_col_back, theme_col_text_hi, 0.2f); | ||||
| blend_color_interpolate_byte(theme_col_tab_highlight_inactive, theme_col_tab_inactive, theme_col_text_hi, 0.12f); | blend_color_interpolate_byte(theme_col_tab_highlight_inactive, theme_col_tab_inactive, theme_col_text_hi, 0.12f); | ||||
| if (fstyle->kerning == 1) { | if (fstyle->kerning == 1) { | ||||
| BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); | BLF_enable(fstyle->uifont_id, BLF_KERNING_DEFAULT); | ||||
| } | } | ||||
| BLF_enable(fontid, BLF_ROTATION); | BLF_enable(fontid, BLF_ROTATION); | ||||
| ▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | for (pc_dyn = ar->panels_category.first; pc_dyn; pc_dyn = pc_dyn->next) { | ||||
| const bool is_active = STREQ(category_id, category_id_active); | const bool is_active = STREQ(category_id, category_id_active); | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| #ifdef USE_FLAT_INACTIVE | #ifdef USE_FLAT_INACTIVE | ||||
| if (is_active) | if (is_active) | ||||
| #endif | #endif | ||||
| { | { | ||||
| glColor3ubv(is_active ? theme_col_back : theme_col_tab_inactive); | glColor3ubv(is_active ? theme_col_tab_active : theme_col_tab_inactive); | ||||
| ui_panel_category_draw_tab(GL_POLYGON, rct->xmin, rct->ymin, rct->xmax, rct->ymax, | ui_panel_category_draw_tab(GL_POLYGON, rct->xmin, rct->ymin, rct->xmax, rct->ymax, | ||||
| tab_curve_radius - px, roundboxtype, true, true, NULL); | tab_curve_radius - px, roundboxtype, true, true, NULL); | ||||
| /* tab outline */ | /* tab outline */ | ||||
| glColor3ubv(theme_col_tab_outline); | glColor3ubv(theme_col_tab_outline); | ||||
| glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | ||||
| ui_panel_category_draw_tab(GL_LINE_STRIP, rct->xmin - px, rct->ymin - px, rct->xmax - px, rct->ymax + px, | ui_panel_category_draw_tab(GL_LINE_STRIP, rct->xmin - px, rct->ymin - px, rct->xmax - px, rct->ymax + px, | ||||
| tab_curve_radius, roundboxtype, true, true, NULL); | tab_curve_radius, roundboxtype, true, true, NULL); | ||||
| ▲ Show 20 Lines • Show All 357 Lines • Show Last 20 Lines | |||||