emacs-devel
[Top][All Lists]
Advanced

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

Re: stipple in menu?


From: Pavel Janík
Subject: Re: stipple in menu?
Date: Sat, 20 Apr 2002 21:51:21 +0200
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2.50 (i386-suse-linux-gnu)

   From: "Jan D." <address@hidden>
   Date: Sat, 20 Apr 2002 20:33:16 +0200

   > How does it look on a monochrome display?  I suspect that is the reason 
for the
   > stipple in the first place.

I do not know, I do not have access to monochrome display and my XFree86
driver for my cards does not support monochrome. Can you, please, test it?


--- xlwmenuP.h.~1.5.~   Mon Oct 29 20:06:53 2001
+++ xlwmenuP.h  Sat Apr 20 19:25:18 2002
@@ -20,11 +20,12 @@
 
 
 /* New fields for the XlwMenu widget instance record */
-typedef struct _XlwMenu_part 
+typedef struct _XlwMenu_part
 {
   /* slots set by the resources */
   XFontStruct* font;
   Pixel                foreground;
+  Pixel                disabled_foreground;
   Pixel                button_foreground;
   Dimension    margin;
   Dimension    horizontal_spacing;
@@ -44,7 +45,7 @@
   /* True means top_shadow_color and/or bottom_shadow_color must be freed.  */
   unsigned free_top_shadow_color_p : 1;
   unsigned free_bottom_shadow_color_p : 1;
-  
+
   /* State of the XlwMenu */
   int                  old_depth;
   widget_value**       old_stack;
@@ -63,7 +64,7 @@
   GC                   foreground_gc;
   GC                   button_gc;
   GC                   background_gc;
-  GC                   inactive_gc;
+  GC                   disabled_gc;
   GC                   inactive_button_gc;
   GC                   shadow_top_gc;
   GC                   shadow_bottom_gc;
@@ -73,20 +74,20 @@
 } XlwMenuPart;
 
 /* Full instance record declaration */
-typedef struct _XlwMenuRec 
+typedef struct _XlwMenuRec
 {
   CorePart     core;
   XlwMenuPart  menu;
 } XlwMenuRec;
 
 /* New fields for the XlwMenu widget class record */
-typedef struct 
+typedef struct
 {
   int  dummy;
 } XlwMenuClassPart;
 
 /* Full class record declaration. */
-typedef struct _XlwMenuClassRec 
+typedef struct _XlwMenuClassRec
 {
   CoreClassPart                core_class;
   XlwMenuClassPart     menu_class;


--- xlwmenu.h.~1.4.~    Mon Oct 29 20:06:53 2001
+++ xlwmenu.h   Sat Apr 20 19:26:01 2002
@@ -10,6 +10,8 @@
 #include "lwlib.h"
 
 /* Resource names used by the XlwMenu widget */
+#define XtNdisabledForeground "disabledForeground"
+#define XtCDisabledForeground "DisabledForeground"
 #define XtNbuttonForeground "buttonForeground"
 #define XtCButtonForeground "ButtonForeground"
 #define XtNmargin "margin"


--- xlwmenu.c.~1.48.~   Sat Apr 20 15:02:54 2002
+++ xlwmenu.c   Sat Apr 20 19:26:18 2002
@@ -139,6 +139,8 @@
      offset(menu.font),XtRString, "XtDefaultFont"},
   {XtNforeground, XtCForeground, XtRPixel, sizeof(Pixel),
      offset(menu.foreground), XtRString, "XtDefaultForeground"},
+  {XtNdisabledForeground, XtCDisabledForeground, XtRPixel, sizeof(Pixel),
+     offset(menu.disabled_foreground), XtRString, "gray60"},
   {XtNbuttonForeground, XtCButtonForeground, XtRPixel, sizeof(Pixel),
      offset(menu.button_foreground), XtRString, "XtDefaultForeground"},
   {XtNmargin, XtCMargin, XtRDimension,  sizeof(Dimension),
@@ -983,7 +985,7 @@
       if (val->enabled)
        text_gc = mw->menu.foreground_gc;
       else
-       text_gc = mw->menu.inactive_gc;
+       text_gc = mw->menu.disabled_gc;
       deco_gc = mw->menu.foreground_gc;
 
       if (separator_p)
@@ -1455,13 +1457,10 @@
                                &xgcv);
 
   xgcv.font = mw->menu.font->fid;
-  xgcv.foreground = mw->menu.foreground;
+  xgcv.foreground = mw->menu.disabled_foreground;
   xgcv.background = mw->core.background_pixel;
-  xgcv.fill_style = FillStippled;
-  xgcv.stipple = mw->menu.gray_pixmap;
-  mw->menu.inactive_gc = XtGetGC ((Widget)mw,
-                                 (GCFont | GCForeground | GCBackground
-                                  | GCFillStyle | GCStipple), &xgcv);
+  mw->menu.disabled_gc = XtGetGC ((Widget)mw,
+                                 (GCFont | GCForeground | GCBackground), 
&xgcv);
 
   xgcv.font = mw->menu.font->fid;
   xgcv.foreground = mw->menu.button_foreground;
@@ -1486,13 +1485,13 @@
 {
   XtReleaseGC ((Widget) mw, mw->menu.foreground_gc);
   XtReleaseGC ((Widget) mw, mw->menu.button_gc);
-  XtReleaseGC ((Widget) mw, mw->menu.inactive_gc);
+  XtReleaseGC ((Widget) mw, mw->menu.disabled_gc);
   XtReleaseGC ((Widget) mw, mw->menu.inactive_button_gc);
   XtReleaseGC ((Widget) mw, mw->menu.background_gc);
   /* let's get some segvs if we try to use these... */
   mw->menu.foreground_gc = (GC) -1;
   mw->menu.button_gc = (GC) -1;
-  mw->menu.inactive_gc = (GC) -1;
+  mw->menu.disabled_gc = (GC) -1;
   mw->menu.inactive_button_gc = (GC) -1;
   mw->menu.background_gc = (GC) -1;
 }

-- 
Pavel Janík

And finally even emacs became warezz ..
                  -- Sascha Luedecke in gnu.emacs.help



reply via email to

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