Use font shadows for all elements except tooltips
git-svn-id: http://tint2.googlecode.com/svn/trunk@766 121b4492-b84c-0410-8b4c-0d4edfb3f3cc
This commit is contained in:
committed by
mrovi9000@gmail.com
parent
6ba25fa945
commit
b4f15db397
@@ -26,7 +26,6 @@
|
||||
#include <string.h>
|
||||
#include <glib.h>
|
||||
#include <unistd.h>
|
||||
#include <math.h>
|
||||
|
||||
#include "window.h"
|
||||
#include "task.h"
|
||||
@@ -392,23 +391,7 @@ void draw_task (void *obj, cairo_t *c)
|
||||
|
||||
double text_posy = (panel->g_task.area.height - height) / 2.0;
|
||||
|
||||
if (panel->g_task.font_shadow) {
|
||||
const int shadow_size = 3;
|
||||
const double shadow_edge_alpha = 0.05;
|
||||
int i, j;
|
||||
for (i = -shadow_size; i <= shadow_size; i++) {
|
||||
for (j = -shadow_size; j <= shadow_size; j++) {
|
||||
cairo_set_source_rgba(c, 0.0, 0.0, 0.0, 1.0 - (1.0 - shadow_edge_alpha) * sqrt((i*i + j*j)/(double)(shadow_size*shadow_size)));
|
||||
pango_cairo_update_layout(c, layout);
|
||||
cairo_move_to(c, panel->g_task.text_posx + i, text_posy + j);
|
||||
pango_cairo_show_layout(c, layout);
|
||||
}
|
||||
}
|
||||
}
|
||||
cairo_set_source_rgba (c, config_text->color[0], config_text->color[1], config_text->color[2], config_text->alpha);
|
||||
pango_cairo_update_layout (c, layout);
|
||||
cairo_move_to (c, panel->g_task.text_posx, text_posy);
|
||||
pango_cairo_show_layout (c, layout);
|
||||
draw_text(layout, c, panel->g_task.text_posx, text_posy, config_text, panel->font_shadow);
|
||||
|
||||
g_object_unref (layout);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user