Home | Software Map | Motif Forums | Bug Home sponsored by ICS 
Full Text Bug Listing
 
Text is not shown on Widgets if setting XmNsensitive to False and using FONT_IS_XFT
Bug#: 1360 Product: OpenMotif Version: 2.3.0 Beta 1 Platform: x86
OS/Version: Linux Status: CLOSED Severity: major Priority: Medium
Resolution: DUPLICATE Assigned To: openmotif-devel@motifzone.net Reported By: akos.putz@evosoft.com
Component: MotifCode Target milestone:2.3.0
URL: 
Summary: Text is not shown on Widgets if setting XmNsensitive to False and using FONT_IS_XFT
Description:
We're using UTF-8 Fonts with openmotif 2.3 (Beta2) and found the
following problem:
If a GUI element set to insensitive, the text of the Widget disappears instead 
of graying out.

See the attached code example and the resource file. Reproduced with version 
2.3 beta 2 and CVS HEAD.

The code example is
--------snip-- resource.c-------------------
#include <X11/Intrinsic.h>
#include <Xm/Xm.h>
#include <Xm/PushB.h>

int main(int argc, char *argv[])
{
        Widget toplevel, button;
        Arg al[10];
        int ac;
        toplevel=XtInitialize(argv[0],"Sample",NULL,0,&argc,argv);
        ac=0;
        button=XtCreateManagedWidget("button",xmPushButtonWidgetClass, 
toplevel,al,ac);

        XtSetSensitive(button, False);
        XtRealizeWidget(toplevel);
        XtMainLoop();
        return 0;
}

-----------snap---------------------------------

----------snip----resource.test-----------
Sample.height:  300
Sample.width:   300
Sample*.button.labelString: "test"

Sample*.renderTable: renditionB
Sample*.renderTable.renditionB.fontName: AR PL KaitiM GB
Sample*.renderTable.renditionB.fontType: FONT_IS_XFT
Sample*.renderTable.renditionB.fontStyle: Bold
Sample*.renderTable.renditionB.fontSize: 16

Xft.antialias: 1
-----------snap--------------------------------

The resource file for the UTF-8 fonts should be activated with the
following command:

$ XENVIRONMENT=`pwd`/resource.test ./a.out

Setting
Sample*.renderTable.renditionB.fontType: FONT_IS_XFT
to
Sample*.renderTable.renditionB.fontType: FONT_IS_FONT

restores the normal (greyed out) behaviour, but we're loosing the XFT 
rendering and unicode.


------- Additional Comments From Yura Syrota 2006-12-21 14:26 -------
Fixed the issue in the CVS HEAD for Label widgets, however it also should be
fixed for Label Gadget.


------- Additional Comments From Yura Syrota 2006-12-21 14:34 -------
Fixed the bug for Label gadgets too.


------- Additional Comments From gerald boudaud 2007-07-19 10:59 -------
Created an attachment (id=119)
proposed patch to fully fix the bug for Widgets


------- Additional Comments From gerald boudaud 2007-07-19 11:00 -------
Created an attachment (id=120)
proposed patch to fully fix the bug for Gadgets


------- Additional Comments From Yura Syrota 2007-11-01 10:39 -------

*** This bug has been marked as a duplicate of 1381 ***


Update this bug

Submit a Patch for this bug

Note: All patches are submitted under the MIT License.