emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lwlib/xlwmenu.c


From: Pavel Janík
Subject: [Emacs-diffs] Changes to emacs/lwlib/xlwmenu.c
Date: Tue, 07 May 2002 01:22:29 -0400

Index: emacs/lwlib/xlwmenu.c
diff -c emacs/lwlib/xlwmenu.c:1.52 emacs/lwlib/xlwmenu.c:1.53
*** emacs/lwlib/xlwmenu.c:1.52  Mon May  6 14:55:30 2002
--- emacs/lwlib/xlwmenu.c       Tue May  7 01:22:29 2002
***************
*** 1455,1462 ****
       XlwMenuWidget mw;
  {
    XGCValues xgcv;
!   XColor temp;
!   int delta;
  
    xgcv.font = mw->menu.font->fid;
    xgcv.foreground = mw->menu.foreground;
--- 1455,1461 ----
       XlwMenuWidget mw;
  {
    XGCValues xgcv;
!   float scale;
  
    xgcv.font = mw->menu.font->fid;
    xgcv.foreground = mw->menu.foreground;
***************
*** 1478,1500 ****
  #define BRIGHTNESS(color) (((color) & 0xff) + (((color) >> 8) & 0xff) + 
(((color) >> 16) & 0xff))
  
    /* Allocate color for disabled menu-items.  */
    if (BRIGHTNESS(mw->menu.foreground) < BRIGHTNESS(mw->core.background_pixel))
!     {
!       delta = 2.3;
!       temp.pixel = mw->menu.foreground;
!     }
    else
!     {
!       delta = 1.2;
!       temp.pixel = mw->core.background_pixel;
!     }
  
    x_alloc_lighter_color_for_widget ((Widget) mw, XtDisplay ((Widget) mw),
                                    mw->core.colormap,
!                                   &temp.pixel,
!                                   delta,
                                    0x8000);
-   mw->menu.disabled_foreground = temp.pixel;
  
    if (mw->menu.foreground == mw->menu.disabled_foreground
        || mw->core.background_pixel == mw->menu.disabled_foreground)
--- 1477,1493 ----
  #define BRIGHTNESS(color) (((color) & 0xff) + (((color) >> 8) & 0xff) + 
(((color) >> 16) & 0xff))
  
    /* Allocate color for disabled menu-items.  */
+   mw->menu.disabled_foreground = mw->menu.foreground;
    if (BRIGHTNESS(mw->menu.foreground) < BRIGHTNESS(mw->core.background_pixel))
!     scale = 2.3;
    else
!     scale = 0.55;
  
    x_alloc_lighter_color_for_widget ((Widget) mw, XtDisplay ((Widget) mw),
                                    mw->core.colormap,
!                                   &mw->menu.disabled_foreground,
!                                   scale,
                                    0x8000);
  
    if (mw->menu.foreground == mw->menu.disabled_foreground
        || mw->core.background_pixel == mw->menu.disabled_foreground)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]