~ubuntu-branches/ubuntu/utopic/cairo-dock-plug-ins/utopic-proposed

« back to all changes in this revision

Viewing changes to clock/src/applet-timer.c

Tags: upstream-3.3.99.beta1.2.really.3.3.2
ImportĀ upstreamĀ versionĀ 3.3.99.beta1.2.really.3.3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
264
264
                                _cairo_dock_delete_texture (myData.iDateTexture);
265
265
                        
266
266
                        double fScale = (double) iWidth / (double) myData.DimensionData.width;
267
 
                        GldiTextDescription labelDescription;
268
 
                        memset (&labelDescription, 0, sizeof (GldiTextDescription));
269
 
                        gldi_text_description_set_font (&labelDescription, (gchar*)"Sans 8");  // casted and then set to null
 
267
                        CairoDockLabelDescription labelDescription;
 
268
                        memset (&labelDescription, 0, sizeof (CairoDockLabelDescription));
 
269
                        labelDescription.iSize = 10;
 
270
                        labelDescription.cFont = (gchar*)"Sans";  // on peut caster car on ne liberera rien.
 
271
                        labelDescription.iWeight = cairo_dock_get_pango_weight_from_1_9 (5);
 
272
                        labelDescription.iStyle = PANGO_STYLE_NORMAL;
270
273
                        labelDescription.fColorStart[0] = myConfig.fDateColor[0];
271
274
                        labelDescription.fColorStart[1] = myConfig.fDateColor[1];
272
275
                        labelDescription.fColorStart[2] = myConfig.fDateColor[2];
273
 
                        labelDescription.bNoDecorations = TRUE;
 
276
                        memcpy (&labelDescription.fColorStop[0], &labelDescription.fColorStart[0], sizeof (labelDescription.fColorStop));
 
277
                        labelDescription.fBackgroundColor[3] = 0;
 
278
                        labelDescription.bOutlined = FALSE;
 
279
                        labelDescription.iMargin = 0;
274
280
                        cairo_surface_t *pDateSurface = cairo_dock_create_surface_from_text_full (s_cDateBuffer,
275
281
                                &labelDescription,
276
282
                                fScale,
279
285
                        //g_print ("date : %dx%d\n", myData.iDateWidth, myData.iDateHeight);
280
286
                        myData.iDateTexture = cairo_dock_create_texture_from_surface (pDateSurface);
281
287
                        cairo_surface_destroy (pDateSurface);
282
 
                        labelDescription.cFont = NULL;
283
 
                        gldi_text_description_reset (&labelDescription);
284
288
                }
285
289
        }
286
290
        if (bNewDate && myConfig.iShowDate == CAIRO_DOCK_INFO_ON_LABEL)