/[emacs]/emacs/lwlib/xlwmenu.c
ViewVC logotype

Diff of /emacs/lwlib/xlwmenu.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.52 by pj, Mon May 6 18:55:30 2002 UTC revision 1.53 by pj, Tue May 7 05:22:29 2002 UTC
# Line 1455  make_drawing_gcs (mw) Line 1455  make_drawing_gcs (mw)
1455       XlwMenuWidget mw;       XlwMenuWidget mw;
1456  {  {
1457    XGCValues xgcv;    XGCValues xgcv;
1458    XColor temp;    float scale;
   int delta;  
1459    
1460    xgcv.font = mw->menu.font->fid;    xgcv.font = mw->menu.font->fid;
1461    xgcv.foreground = mw->menu.foreground;    xgcv.foreground = mw->menu.foreground;
# Line 1478  make_drawing_gcs (mw) Line 1477  make_drawing_gcs (mw)
1477  #define BRIGHTNESS(color) (((color) & 0xff) + (((color) >> 8) & 0xff) + (((color) >> 16) & 0xff))  #define BRIGHTNESS(color) (((color) & 0xff) + (((color) >> 8) & 0xff) + (((color) >> 16) & 0xff))
1478    
1479    /* Allocate color for disabled menu-items.  */    /* Allocate color for disabled menu-items.  */
1480      mw->menu.disabled_foreground = mw->menu.foreground;
1481    if (BRIGHTNESS(mw->menu.foreground) < BRIGHTNESS(mw->core.background_pixel))    if (BRIGHTNESS(mw->menu.foreground) < BRIGHTNESS(mw->core.background_pixel))
1482      {      scale = 2.3;
       delta = 2.3;  
       temp.pixel = mw->menu.foreground;  
     }  
1483    else    else
1484      {      scale = 0.55;
       delta = 1.2;  
       temp.pixel = mw->core.background_pixel;  
     }  
1485    
1486    x_alloc_lighter_color_for_widget ((Widget) mw, XtDisplay ((Widget) mw),    x_alloc_lighter_color_for_widget ((Widget) mw, XtDisplay ((Widget) mw),
1487                                      mw->core.colormap,                                      mw->core.colormap,
1488                                      &temp.pixel,                                      &mw->menu.disabled_foreground,
1489                                      delta,                                      scale,
1490                                      0x8000);                                      0x8000);
   mw->menu.disabled_foreground = temp.pixel;  
1491    
1492    if (mw->menu.foreground == mw->menu.disabled_foreground    if (mw->menu.foreground == mw->menu.disabled_foreground
1493        || mw->core.background_pixel == mw->menu.disabled_foreground)        || mw->core.background_pixel == mw->menu.disabled_foreground)

Legend:
Removed from v.1.52  
changed lines
  Added in v.1.53

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26