Fix for mistake in recent shadow addition in tabs
authorCampbell Barton <ideasman42@gmail.com>
Wed, 15 Jan 2014 04:45:55 +0000 (15:45 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 15 Jan 2014 04:46:32 +0000 (15:46 +1100)
source/blender/editors/gpencil/editaction_gpencil.c
source/blender/editors/interface/interface_panel.c

index cb3135c710d534ac77923e180ba440c0fa7b41a6..9b7d691f08164de816e4c7fe1ab9fa6dae5fc586 100644 (file)
@@ -469,9 +469,9 @@ void paste_gpdata(Scene *scene)
 /* -------------------------------------- */
 /* Snap Tools */
 
-static short snap_gpf_nearest(bGPDframe *gpf, Scene *UNUSED(scene))
+static short snap_gpf_nearest(bGPDframe *UNUSED(gpf), Scene *UNUSED(scene))
 {
-#if 0 /* XXX: gpf->framenum is already an int! */
+#if 0 /* note: gpf->framenum is already an int! */
        if (gpf->flag & GP_FRAME_SELECT)
                gpf->framenum = (int)(floor(gpf->framenum + 0.5));
 #endif
index 6a12f43e46c733d06346482f05f2b7a5377d8d6a..696496518378b5b1ecf7abbb4e7d8822714438c4 100644 (file)
@@ -1450,6 +1450,10 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
        ui_fontscale(&fstyle_points, aspect / (U.pixelsize * 1.1f));
        BLF_size(fontid, fstyle_points, U.dpi);
 
+       BLF_enable(fontid, BLF_SHADOW);
+       BLF_shadow(fontid, 3, 1.0f, 1.0f, 1.0f, 0.25f);
+       BLF_shadow_offset(fontid, -1, -1);
+
        BLI_assert(UI_panel_category_is_visible(ar));
 
 
@@ -1543,12 +1547,8 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 
                /* tab titles */
 
-               /* first draw shadow, in this case white */
-               glColor3ubv(theme_col_text);
                /* draw white shadow to give text more depth */
-               BLF_enable(fontid, BLF_SHADOW);
-               BLF_shadow(fontid, 3, 1.0f, 1.0f, 1.0f, 0.25f);
-               BLF_shadow_offset(fontid, -1, -1);
+               glColor3ubv(theme_col_text);
 
                /* main tab title */
                BLF_draw(fontid, category_id_draw, category_draw_len);
@@ -1592,6 +1592,8 @@ void UI_panel_category_draw_all(ARegion *ar, const char *category_id_active)
 
        BLF_disable(fontid, BLF_ROTATION);
 
+       BLF_disable(fontid, BLF_SHADOW);
+
        if (fstyle->kerning == 1) {
                BLF_disable(fstyle->uifont_id, BLF_KERNING_DEFAULT);
        }