Changeset 90

Show
Ignore:
Timestamp:
06/24/08 18:40:41 (2 months ago)
Author:
inz
Message:

Use transparency instead of fading to black.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • osso-statusbar-cpu/trunk/debian/changelog

    r89 r90  
    33  * New OS2008 look icon. 
    44  * Remove 'Mandatory' field from .desktop. 
     5  * Use transparency instead of fading to black. 
    56 
    6  -- Santtu Lakkala <inz@inz.fi>  Tue, 24 Jun 2008 18:39:13 +0300 
     7 -- Santtu Lakkala <inz@inz.fi>  Tue, 24 Jun 2008 18:40:31 +0300 
    78 
    89osso-statusbar-cpu (0.6.1) mistral; urgency=low 
  • osso-statusbar-cpu/trunk/src/common.c

    r61 r90  
    1818        guint width, height, rowstride, n_channels; 
    1919        guchar *pixels, *p, *p0; 
     20        guchar a = 0xf0; 
    2021 
    2122        n_channels = gdk_pixbuf_get_n_channels(pixbuf); 
     
    3435        for (y = AREA_Y; y < AREA_Y + AREA_H; y++) { 
    3536                for (x = xx; x < xx + w - 1; x++) { 
    36                         guchar temp; 
    3737                        p = pixels + y * rowstride + x * n_channels; 
    3838                        p0 = pixels + y * rowstride + (x + 1) * n_channels; 
    3939 
    40                         temp = p0[0]; 
    41                         p[0] = temp; 
    42                         temp = p0[1]; 
    43                         p[1] = temp; 
    44                         temp = p0[2]; 
    45                         p[2] = temp; 
    46 /*                      p[0] = p0[0]; 
     40                        p[0] = p0[0]; 
    4741                        p[1] = p0[1]; 
    48                         p[2] = p0[2]; */ 
     42                        p[2] = p0[2]; 
     43                        p[3] = p0[3]; 
    4944                } 
    5045        } 
     
    5651                        n_channels; 
    5752                if (AREA_H - y == user) { 
    58                         r /= 2; 
    59                         g /= 2; 
    60                         b /= 2; 
     53                        a >>= 1; 
    6154                } 
    6255                if (AREA_H - y == user + sys) { 
    63                         r /= 2; 
    64                         g /= 2; 
    65                         b /= 2; 
     56                        a >>= 1; 
    6657                } 
    6758                if (AREA_H - y == user + sys + nice) { 
    68                         r = 0; 
    69                         g = 0; 
    70                         b = 0; 
     59                        a = 0; 
    7160                } 
    7261                p[0] = r; 
    7362                p[1] = g; 
    7463                p[2] = b; 
     64                p[3] = a; 
    7565        } 
    7666