]> Dogcows Code - chaz/tint2/commitdiff
cleanup
authorThierry Lorthiois <lorthiois@bbsoft.fr>
Mon, 19 Apr 2010 22:06:23 +0000 (22:06 +0000)
committerThierry Lorthiois <lorthiois@bbsoft.fr>
Mon, 19 Apr 2010 22:06:23 +0000 (22:06 +0000)
src/taskbar/task.c
src/tooltip/tooltip.c

index d4fa72f5d854a4ab6480fdda149715a9e85a3661..921f067ad4d9dd46ee4790e821281024b3a87f80 100644 (file)
@@ -352,20 +352,18 @@ void draw_task (void *obj, cairo_t *c)
 
                /* Drawing width and Cut text */
                // pango use U+22EF or U+2026
-               pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
                pango_layout_set_width(layout, ((Taskbar*)tsk->area.parent)->text_width * PANGO_SCALE);
                pango_layout_set_height(layout, panel->g_task.text_height * PANGO_SCALE);
                pango_layout_set_wrap(layout, PANGO_WRAP_CHAR);
+               pango_layout_set_ellipsize (layout, PANGO_ELLIPSIZE_END);
 
                /* Center text */
                if (panel->g_task.centered) pango_layout_set_alignment (layout, PANGO_ALIGN_CENTER);
                else pango_layout_set_alignment (layout, PANGO_ALIGN_LEFT);
 
                pango_layout_get_pixel_size (layout, &width, &height);
-               //printf("nombre de lignes  %d, w %d, h %d, text_height %d\n", pango_layout_get_line_count(layout), width, height, (int)panel->g_task.text_height);
 
                config_text = &panel->g_task.font[tsk->current_state];
-
                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);
index 11b7f3b06dd1f006b580b04e1f7b47224692c4b9..a724473c397cf4b7cc5ecda5cb8a0c56f65110a9 100644 (file)
@@ -231,7 +231,7 @@ void tooltip_update()
        pango_layout_get_pixel_extents(layout, &r1, &r2);
        pango_layout_set_width(layout, width*PANGO_SCALE);
        pango_layout_set_height(layout, height*PANGO_SCALE);
-       pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_MIDDLE);
+       pango_layout_set_ellipsize(layout, PANGO_ELLIPSIZE_END);
        // I do not know why this is the right way, but with the below cairo_move_to it seems to be centered (horiz. and vert.)
        cairo_move_to(c, -r1.x/2+g_tooltip.bg->border.width+g_tooltip.paddingx, -r1.y/2+g_tooltip.bg->border.width+g_tooltip.paddingy);
        pango_cairo_show_layout (c, layout);
This page took 0.02797 seconds and 4 git commands to generate.