[Bf-committers] Sculpting UI issue

Sergey Sharybin sergey.vfx at gmail.com
Thu Mar 15 22:12:13 CET 2012


Commited the patch.

No need to update startup.blend, better to do a versioning check to make
user's startup.blends working fine as well.
Hopefully everybody will happy with labels now :)

On Thu, Mar 15, 2012 at 11:51 AM, Nicholas Bishop
<nicholasbishop at gmail.com>wrote:

> Here's a patch that should more or less resolve the issue (at end of
> message.)
>
> This changes the text background to extend all the way to the right
> edge, gives the rectangle alpha blending, and makes it themeable using
> the under User Interface > Menu Item > Item.
>
> Things needed before committing:
> * Someone should pick a nice default (here I've used 172, 172, 172, 128.)
> * The default .blend should be updated too, otherwise it'll show as
> ugly bright-white rectangles.
> * Maybe the other theme presets should be updated too?
>
> I prefer to let UI folks handle this, hopefully someone reading this
> can confirm the patch looks good and finish this?
>
> Thanks,
> -Nicholas
>
> Index: source/blender/editors/interface/interface_widgets.c
> ===================================================================
> --- source/blender/editors/interface/interface_widgets.c        (revision
> 44900)
> +++ source/blender/editors/interface/interface_widgets.c        (working
> copy)
> @@ -1367,7 +1367,7 @@ static struct uiWidgetColors wcol_menu_item= {
>        {0, 0, 0, 255},
>        {0, 0, 0, 0},
>        {86, 128, 194, 255},
> -       {255, 255, 255, 255},
> +       {172, 172, 172, 128},
>
>        {255, 255, 255, 255},
>        {0, 0, 0, 255},
> @@ -3297,15 +3297,17 @@ void ui_draw_preview_item(uiFontStyle *fstyle,
> rcti *rect, const char *name, int
>        bg_rect = trect;
>        bg_rect.xmin = rect->xmin + PREVIEW_PAD;
>        bg_rect.ymin = rect->ymin + PREVIEW_PAD;
> -       bg_rect.xmax += PREVIEW_PAD / 2;
> +       bg_rect.xmax = rect->xmax - PREVIEW_PAD;
>        bg_rect.ymax += PREVIEW_PAD / 2;
>
>        if(bg_rect.xmax > rect->xmax - PREVIEW_PAD)
>                bg_rect.xmax = rect->xmax - PREVIEW_PAD;
>
>        UI_GetThemeColor3ubv(TH_BUTBACK, bg_col);
> -       glColor3ubv(bg_col);
> +       glColor4ubv((unsigned char*)wt->wcol.item);
> +       glEnable(GL_BLEND);
>        glRecti(bg_rect.xmin, bg_rect.ymin, bg_rect.xmax, bg_rect.ymax);
> +       glDisable(GL_BLEND);
>
>        if (state == UI_ACTIVE)
>                glColor3ubv((unsigned char*)wt->wcol.text);
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>



-- 
With best regards, Sergey Sharybin


More information about the Bf-committers mailing list