From: Pavel@Janik.cz (Pavel Janík)
Cc: emacs-devel@gnu.org
Subject: Re: stipple in menu?
Date: Sat, 20 Apr 2002 21:51:21 +0200 [thread overview]
Message-ID: <m3d6wu6tdy.fsf@Janik.cz> (raw)
In-Reply-To: <3CC1B46C.469D536@swipnet.se> ("Jan D."'s message of "Sat, 20 Apr 2002 20:33:16 +0200")
From: "Jan D." <jan.h.d@swipnet.se>
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
next prev parent reply other threads:[~2002-04-20 19:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-20 17:35 stipple in menu? Pavel Janík
2002-04-20 18:33 ` Jan D.
2002-04-20 19:51 ` Pavel Janík [this message]
2002-04-22 19:30 ` Jan D.
2002-04-21 13:48 ` Kim F. Storm
2002-04-21 13:25 ` Pavel Janík
2002-04-21 14:20 ` Miles Bader
2002-04-22 7:46 ` Richard Stallman
2002-04-22 12:38 ` Pavel Janík
2002-04-23 19:30 ` Richard Stallman
2002-04-23 20:00 ` Pavel Janík
2002-04-25 6:05 ` Richard Stallman
2002-05-06 18:56 ` Pavel Janík
2002-05-07 20:07 ` Richard Stallman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3d6wu6tdy.fsf@Janik.cz \
--to=pavel@janik.cz \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).