1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

dtfile/File.c: implement a hack to fix Ticket #19, tree icons are black

The real issue seems to be a bug in Motif.  The background color for
these tree icons is always black.  Depending on what Palette you have
selected, it's possible for the foreground color to be black.  When
this happens, you will see a black square since both fg and bg are now
black.

You can select another Palette that works (ie: foreground is white)
and the problem goes away.  So, for now, we always force a white
foreground color so the actual symbols are visible in tree mode.
This commit is contained in:
Jon Trulson 2018-04-29 19:44:31 -06:00
parent cd5d240213
commit c936a8c065

View file

@ -6131,6 +6131,19 @@ CreateTreeIcons(Widget w)
XtSetArg (args[1], XmNforeground, &foreground_color); XtSetArg (args[1], XmNforeground, &foreground_color);
XtGetValues (w, args, 2); XtGetValues (w, args, 2);
/* JET - 4/29/18, It seems for some reason that no matter what
* background is specified for these pixmaps, it will always be
* black when drawn. This seems like a Motif issue. The problem
* arises when earlier on, depending on what Palette has been
* selected for the user, the foreground can also be black. In
* those cases, instead of seeing the pixmap, you see a black square
* since both the fg and bg colors are black now. We "fix" this by
* always forcing the foreground to be white. This is a
* "workaround" - the real problem still needs to be located and
* fixed. in motif.
*/
foreground_color = 0x00ffffff;
for (i = 0; i < 3; i++) for (i = 0; i < 3; i++)
{ {
TreeBtnWd[i] = 5; TreeBtnWd[i] = 5;