public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in x11-libs/openmotif/files: openmotif-2.3.0-sensitivity-invisible.patch
@ 2008-02-17 11:44 Ulrich Mueller (ulm)
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-02-17 11:44 UTC (permalink / raw
  To: gentoo-commits

ulm         08/02/17 11:44:28

  Added:                openmotif-2.3.0-sensitivity-invisible.patch
  Log:
  Fix problem with invisible menu items in ddd, bug 210220.
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.1                  x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch?rev=1.1&content-type=text/plain

Index: openmotif-2.3.0-sensitivity-invisible.patch
===================================================================
--- openmotif-2.3.0-orig/lib/Xm/I18List.c	2005-12-09 15:29:01.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/I18List.c	2008-02-16 00:48:53.000000000 +0100
@@ -2086,7 +2086,7 @@
     values.graphics_exposures = False;
 
     mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
-    smask = mask | GCStipple | GCFillStyle;
+    smask = mask | GCFillStyle;
     
     XmI18List_gc(ilist) = XtGetGC(w, mask, &values);
 
@@ -2117,6 +2117,7 @@
     	XmI18List_entry_background_gc(ilist) = XtGetGC(w, mask, &values);
     }
 
+    values.foreground = _XmAssignInsensitiveColor(w);
     XmI18List_stippled_gc(ilist) = XtGetGC(w, smask, &values);
 
     if (XmI18List_entry_background_use(ilist))
--- openmotif-2.3.0-orig/lib/Xm/IconButton.c	2005-10-17 15:15:51.000000000 +0200
+++ openmotif-2.3.0/lib/Xm/IconButton.c	2008-02-16 00:48:53.000000000 +0100
@@ -1836,7 +1836,7 @@
     values.fill_style = FillStippled;
 
     mask = GCForeground | GCBackground | GCGraphicsExposures;
-    smask = mask | GCStipple | GCFillStyle;
+    smask = mask | GCFillStyle;
 
     if (fs) {
         values.font = fs->fid;
@@ -1844,6 +1844,7 @@
     }
 
     XmIconButton_gc(iw) = XtGetGC(w, mask, &values);
+    values.foreground = _XmAssignInsensitiveColor(w);
     XmIconButton_stippled_text_gc(iw) = XtGetGC(w, smask, &values);
 
     /*
--- openmotif-2.3.0-orig/lib/Xm/IconG.c	2003-10-06 12:10:24.000000000 +0200
+++ openmotif-2.3.0/lib/Xm/IconG.c	2008-02-16 00:48:53.000000000 +0100
@@ -3134,9 +3134,9 @@
 
 
     /** insensitive gc **/
-    values.foreground = IG_Foreground(wid) ;
+    values.foreground = _XmAssignInsensitiveColor(XtParent(wid));
     values.background = IG_Background(wid) ; 
-    valueMask |= GCFillStyle | GCStipple;
+    valueMask |= GCFillStyle;
     values.fill_style = FillOpaqueStippled;
     values.stipple = _XmGetInsensitiveStippleBitmap(wid);
 
--- openmotif-2.3.0-orig/lib/Xm/Label.c	2006-12-21 20:21:27.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/Label.c	2008-02-16 00:48:53.000000000 +0100
@@ -688,8 +688,8 @@
   lw->label.normal_GC = XtAllocateGC((Widget) lw, 0, valueMask, &values,
 				     dynamicMask, 0);
   
-  valueMask |= GCFillStyle | GCStipple;
-  values.foreground = lw->core.background_pixel;
+  valueMask |= GCFillStyle;
+  values.foreground = _XmAssignInsensitiveColor((Widget)lw);
   values.background = lw->primitive.foreground;
   values.fill_style = FillOpaqueStippled;
   values.stipple = _XmGetInsensitiveStippleBitmap((Widget) lw);
@@ -1557,7 +1557,7 @@
 		       lp->StringRect.width,
 		       lp->alignment,
 		       XmPrim_layout_direction(lw), NULL);
-#ifdef USE_XFT
+#if 0
       if (!XtIsSensitive(wid))
         {
           XSetFillStyle(XtDisplay(lw), lp->insensitive_GC, FillStippled);
--- openmotif-2.3.0-orig/lib/Xm/LabelG.c	2006-12-26 18:37:09.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/LabelG.c	2008-02-16 00:48:53.000000000 +0100
@@ -1247,8 +1247,8 @@
     LabG_NormalGC(lw) = XtAllocateGC((Widget) mw, 0, valueMask, &values,
         dynamicMask, 0);
 
-    valueMask |= GCFillStyle | GCStipple;
-    values.foreground = LabG_Background(lw); 
+    valueMask |= GCFillStyle;
+    values.foreground = _XmAssignInsensitiveColor((Widget)mw);
     values.background = LabG_Foreground(lw);
     values.fill_style = FillOpaqueStippled;
 
@@ -2435,7 +2435,7 @@
             lw->rectangle.y + LabG_TextRect(lw).y + LabG_StringRect(lw).y,
             LabG_StringRect(lw).width,
             LabG_Alignment(lw), LayoutG(lw), NULL);
-#ifdef USE_XFT
+#if 0
         if (!XtIsSensitive(wid)) {
           XSetFillStyle(XtDisplay(lw), LabG_InsensitiveGC(lw), FillStippled);
           XFillRectangle(XtDisplay(lw), XtWindow(lw), LabG_InsensitiveGC(lw),
--- openmotif-2.3.0-orig/lib/Xm/List.c	2007-01-24 18:07:35.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/List.c	2008-02-16 00:48:53.000000000 +0100
@@ -2758,9 +2758,9 @@
   lw->list.InverseGC = XtAllocateGC((Widget) lw, lw->core.depth,
 				    valueMask, &values, modifyMask, 0);
 
-  values.foreground = lw->primitive.foreground;
+  values.foreground = _XmAssignInsensitiveColor(lw);
   values.background = lw->core.background_pixel;
-  valueMask |= GCStipple | GCFillStyle;
+  valueMask |= GCFillStyle;
   values.fill_style = FillOpaqueStippled;
   values.stipple = _XmGetInsensitiveStippleBitmap((Widget) lw);
 
--- openmotif-2.3.0-orig/lib/Xm/TextF.c	2006-08-28 15:53:30.000000000 +0200
+++ openmotif-2.3.0/lib/Xm/TextF.c	2008-02-16 00:48:53.000000000 +0100
@@ -1960,8 +1960,7 @@
     valueMask |= GCFillStyle;
     if (stipple) {
       values.fill_style = FillStippled;
-      valueMask |= GCStipple;
-      values.stipple = tf->text.stipple_tile;
+      values.foreground = _XmAssignInsensitiveColor((Widget)tf);
     } else 
       values.fill_style = FillSolid;
   }
--- openmotif-2.3.0-orig/lib/Xm/TextOut.c	2006-12-12 12:54:14.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/TextOut.c	2008-02-16 00:48:53.000000000 +0100
@@ -625,8 +625,7 @@
     valueMask |= GCFillStyle;
     if (stipple) {
       values.fill_style = FillStippled;
-      valueMask |= GCStipple;
-      values.stipple = data->stipple_tile;
+      values.foreground = _XmAssignInsensitiveColor((Widget)tw);
     } else 
       values.fill_style = FillSolid;
   }
--- openmotif-2.3.0-orig/lib/Xm/Xm.c	2005-12-19 11:32:36.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/Xm.c	2008-02-16 00:48:53.000000000 +0100
@@ -426,3 +426,45 @@
     _XmAppUnlock(app);
     return return_wid;
 }
+
+/************************************************************************
+ *
+ *  _XmAssignInsensitiveColor
+ *  Allocate the Gray color for display widget like insensitive.
+ *
+ *
+ ************************************************************************/
+
+Pixel
+_XmAssignInsensitiveColor(Widget w)
+{
+    static XColor screen_in_out;
+    int status;
+    Pixel p;
+
+    p = w->core.background_pixel;
+    XQueryColor(XtDisplay(w), w->core.colormap, &screen_in_out);
+    if ((abs(screen_in_out.red-RGB_GREY_VALUE)<RGB_GREY_PRESISE)
+	&& (abs(screen_in_out.green-RGB_GREY_VALUE)<RGB_GREY_PRESISE)
+	&& (abs(screen_in_out.blue-RGB_GREY_VALUE)<RGB_GREY_PRESISE)) {
+	/*text color have to be more light for wosn't be invisible*/
+	screen_in_out.red=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
+	screen_in_out.green=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
+	screen_in_out.blue=(RGB_GREY_VALUE+RGB_GREY_VALUE/2)<<8;
+
+	status = XAllocColor(XtDisplay(w), w->core.colormap, &screen_in_out);
+	if (status)
+	    p = screen_in_out.pixel;
+    } else {
+	/*gray color*/
+	screen_in_out.red=RGB_GREY_VALUE<<8;
+	screen_in_out.green=RGB_GREY_VALUE<<8;
+	screen_in_out.blue=RGB_GREY_VALUE<<8;
+
+	status = XAllocColor(XtDisplay(w), w->core.colormap, &screen_in_out);
+	if (status)
+	    p = screen_in_out.pixel;
+    }
+
+    return p;
+}
--- openmotif-2.3.0-orig/lib/Xm/XmI.h	2005-12-19 11:32:36.000000000 +0100
+++ openmotif-2.3.0/lib/Xm/XmI.h	2008-02-16 00:48:53.000000000 +0100
@@ -276,5 +276,9 @@
 }  /* Close scope of 'extern "C"' declaration which encloses file. */
 #endif
 
+#define RGB_GREY_VALUE 128
+#define RGB_GREY_PRESISE 50
+extern Pixel _XmAssignInsensitiveColor(Widget w);
+
 #endif /* _XmI_h */
 /* DON'T ADD ANYTHING AFTER THIS #endif */



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [gentoo-commits] gentoo-x86 commit in x11-libs/openmotif/files: openmotif-2.3.0-sensitivity-invisible.patch
@ 2008-04-04 12:38 Ulrich Mueller (ulm)
  0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Mueller (ulm) @ 2008-04-04 12:38 UTC (permalink / raw
  To: gentoo-commits

ulm         08/04/04 12:38:43

  Modified:             openmotif-2.3.0-sensitivity-invisible.patch
  Log:
  Fix multilist display problem, bug 215984.
  (Portage version: 2.1.4.4)

Revision  Changes    Path
1.2                  x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch

file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch?r1=1.1&r2=1.2

Index: openmotif-2.3.0-sensitivity-invisible.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/x11-libs/openmotif/files/openmotif-2.3.0-sensitivity-invisible.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- openmotif-2.3.0-sensitivity-invisible.patch	17 Feb 2008 11:44:28 -0000	1.1
+++ openmotif-2.3.0-sensitivity-invisible.patch	4 Apr 2008 12:38:42 -0000	1.2
@@ -1,22 +1,3 @@
---- openmotif-2.3.0-orig/lib/Xm/I18List.c	2005-12-09 15:29:01.000000000 +0100
-+++ openmotif-2.3.0/lib/Xm/I18List.c	2008-02-16 00:48:53.000000000 +0100
-@@ -2086,7 +2086,7 @@
-     values.graphics_exposures = False;
- 
-     mask = GCForeground | GCBackground | GCFont | GCGraphicsExposures;
--    smask = mask | GCStipple | GCFillStyle;
-+    smask = mask | GCFillStyle;
-     
-     XmI18List_gc(ilist) = XtGetGC(w, mask, &values);
- 
-@@ -2117,6 +2117,7 @@
-     	XmI18List_entry_background_gc(ilist) = XtGetGC(w, mask, &values);
-     }
- 
-+    values.foreground = _XmAssignInsensitiveColor(w);
-     XmI18List_stippled_gc(ilist) = XtGetGC(w, smask, &values);
- 
-     if (XmI18List_entry_background_use(ilist))
 --- openmotif-2.3.0-orig/lib/Xm/IconButton.c	2005-10-17 15:15:51.000000000 +0200
 +++ openmotif-2.3.0/lib/Xm/IconButton.c	2008-02-16 00:48:53.000000000 +0100
 @@ -1836,7 +1836,7 @@



-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-04-04 12:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-04 12:38 [gentoo-commits] gentoo-x86 commit in x11-libs/openmotif/files: openmotif-2.3.0-sensitivity-invisible.patch Ulrich Mueller (ulm)
  -- strict thread matches above, loose matches on Subject: below --
2008-02-17 11:44 Ulrich Mueller (ulm)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox