diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 20:57:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-01 21:12:07 +0300 |
commit | 26c5a1c301d3d554c4b1244b219f9883249f382d (patch) | |
tree | 57e70c82e8a594eb7592e2c06fe46d0a7a2cd5d8 /source/blender/editors/interface/interface_panel.c | |
parent | 71e65daf5c15ef54eb61b998d5b7ccfe14bd2816 (diff) |
Cleanup: right shift in interface code
Diffstat (limited to 'source/blender/editors/interface/interface_panel.c')
-rw-r--r-- | source/blender/editors/interface/interface_panel.c | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/editors/interface/interface_panel.c b/source/blender/editors/interface/interface_panel.c index d4180567022..744f6b3c4d0 100644 --- a/source/blender/editors/interface/interface_panel.c +++ b/source/blender/editors/interface/interface_panel.c @@ -620,9 +620,10 @@ void ui_draw_aligned_panel(uiStyle *style, uiBlock *block, const rcti *rect, con #endif { glEnable(GL_BLEND); - UI_icon_draw_aspect(headrect.xmax - ((PNL_ICON * 2.2f) / block->aspect), headrect.ymin + (5.0f / block->aspect), - (panel->flag & PNL_PIN) ? ICON_PINNED : ICON_UNPINNED, - (block->aspect / UI_DPI_FAC), 1.0f); + UI_icon_draw_aspect( + headrect.xmax - ((PNL_ICON * 2.2f) / block->aspect), headrect.ymin + (5.0f / block->aspect), + (panel->flag & PNL_PIN) ? ICON_PINNED : ICON_UNPINNED, + (block->aspect / UI_DPI_FAC), 1.0f); glDisable(GL_BLEND); } @@ -1755,18 +1756,21 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) #endif { 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, - tab_curve_radius - px, roundboxtype, true, true, NULL); + ui_panel_category_draw_tab( + GL_POLYGON, rct->xmin, rct->ymin, rct->xmax, rct->ymax, + tab_curve_radius - px, roundboxtype, true, true, NULL); /* tab outline */ glColor3ubv(theme_col_tab_outline); - 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); + 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 highlight (3d look) */ glColor3ubv(is_active ? theme_col_tab_highlight : theme_col_tab_highlight_inactive); - ui_panel_category_draw_tab(GL_LINE_STRIP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, - tab_curve_radius, roundboxtype, true, false, - is_active ? theme_col_back : theme_col_tab_inactive); + ui_panel_category_draw_tab( + GL_LINE_STRIP, rct->xmin, rct->ymin, rct->xmax, rct->ymax, + tab_curve_radius, roundboxtype, true, false, + is_active ? theme_col_back : theme_col_tab_inactive); } /* tab blackline */ @@ -1779,8 +1783,9 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active) } if (do_scaletabs) { - category_draw_len = BLF_width_to_strlen(fontid, category_id_draw, category_draw_len, - category_width, NULL); + category_draw_len = BLF_width_to_strlen( + fontid, category_id_draw, category_draw_len, + category_width, NULL); } BLF_position(fontid, rct->xmax - text_v_ofs, rct->ymin + tab_v_pad_text, 0.0f); |