Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_text/text_draw.c
| Show First 20 Lines • Show All 886 Lines • ▼ Show 20 Lines | static void draw_textscroll(SpaceText *st, rcti *scroll, rcti *back) | ||||
| bTheme *btheme = UI_GetTheme(); | bTheme *btheme = UI_GetTheme(); | ||||
| uiWidgetColors wcol = btheme->tui.wcol_scroll; | uiWidgetColors wcol = btheme->tui.wcol_scroll; | ||||
| unsigned char col[4]; | unsigned char col[4]; | ||||
| float rad; | float rad; | ||||
| UI_ThemeColor(TH_BACK); | UI_ThemeColor(TH_BACK); | ||||
| glRecti(back->xmin, back->ymin, back->xmax, back->ymax); | glRecti(back->xmin, back->ymin, back->xmax, back->ymax); | ||||
| uiWidgetScrollDraw(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT) ? UI_SCROLL_PRESSED : 0); | UI_draw_widget_scroll(&wcol, scroll, &st->txtbar, (st->flags & ST_SCROLL_SELECT) ? UI_SCROLL_PRESSED : 0); | ||||
| uiSetRoundBox(UI_CNR_ALL); | UI_draw_roundbox_corner_set(UI_CNR_ALL); | ||||
| rad = 0.4f * min_ii(BLI_rcti_size_x(&st->txtscroll), BLI_rcti_size_y(&st->txtscroll)); | rad = 0.4f * min_ii(BLI_rcti_size_x(&st->txtscroll), BLI_rcti_size_y(&st->txtscroll)); | ||||
| UI_GetThemeColor3ubv(TH_HILITE, col); | UI_GetThemeColor3ubv(TH_HILITE, col); | ||||
| col[3] = 48; | col[3] = 48; | ||||
| glColor4ubv(col); | glColor4ubv(col); | ||||
| glEnable(GL_BLEND); | glEnable(GL_BLEND); | ||||
| uiRoundBox(st->txtscroll.xmin + 1, st->txtscroll.ymin, st->txtscroll.xmax - 1, st->txtscroll.ymax, rad); | UI_draw_roundbox(st->txtscroll.xmin + 1, st->txtscroll.ymin, st->txtscroll.xmax - 1, st->txtscroll.ymax, rad); | ||||
| glDisable(GL_BLEND); | glDisable(GL_BLEND); | ||||
| } | } | ||||
| /*********************** draw documentation *******************************/ | /*********************** draw documentation *******************************/ | ||||
| static void draw_documentation(SpaceText *st, ARegion *ar) | static void draw_documentation(SpaceText *st, ARegion *ar) | ||||
| { | { | ||||
| TextLine *tmp; | TextLine *tmp; | ||||
| ▲ Show 20 Lines • Show All 117 Lines • ▼ Show 20 Lines | static void draw_suggestion_list(SpaceText *st, ARegion *ar) | ||||
| boxw = SUGG_LIST_WIDTH * st->cwidth + 20; | boxw = SUGG_LIST_WIDTH * st->cwidth + 20; | ||||
| boxh = SUGG_LIST_SIZE * lheight + 8; | boxh = SUGG_LIST_SIZE * lheight + 8; | ||||
| if (x + boxw > ar->winx) | if (x + boxw > ar->winx) | ||||
| x = MAX2(0, ar->winx - boxw); | x = MAX2(0, ar->winx - boxw); | ||||
| /* not needed but stands out nicer */ | /* not needed but stands out nicer */ | ||||
| uiDrawBoxShadow(220, x, y - boxh, x + boxw, y); | UI_draw_box_shadow(220, x, y - boxh, x + boxw, y); | ||||
| UI_ThemeColor(TH_SHADE1); | UI_ThemeColor(TH_SHADE1); | ||||
| glRecti(x - 1, y + 1, x + boxw + 1, y - boxh - 1); | glRecti(x - 1, y + 1, x + boxw + 1, y - boxh - 1); | ||||
| UI_ThemeColorShade(TH_BACK, 16); | UI_ThemeColorShade(TH_BACK, 16); | ||||
| glRecti(x, y, x + boxw, y - boxh); | glRecti(x, y, x + boxw, y - boxh); | ||||
| /* Set the top 'item' of the visible list */ | /* Set the top 'item' of the visible list */ | ||||
| for (i = 0, item = first; i < *top && item->next; i++, item = item->next) ; | for (i = 0, item = first; i < *top && item->next; i++, item = item->next) ; | ||||
| ▲ Show 20 Lines • Show All 471 Lines • Show Last 20 Lines | |||||