Specify a resource for all widgets, possible? - Motif

This is a discussion on Specify a resource for all widgets, possible? - Motif ; Hello, I'm currently trying to "theme" motif by specifying some colors in my .Xdefaults. What I did was, I gave almost all Widgets the backgroundcolor #949494 (e.g. *XmPushButton.background: #949494). Of course this results in a huge list of resources. Is ...

+ Reply to Thread
Results 1 to 6 of 6

Thread: Specify a resource for all widgets, possible?

  1. Specify a resource for all widgets, possible?

    Hello,
    I'm currently trying to "theme" motif by specifying some colors in
    my .Xdefaults.
    What I did was, I gave almost all Widgets the backgroundcolor #949494
    (e.g. *XmPushButton.background: #949494).
    Of course this results in a huge list of resources.
    Is there an easier solution to set the background of EVERY widget to
    #949494?
    It's the same with highlightColor.
    I tried to set the *XmPrimitive.background to #949494 but that didn't
    do anything.
    Unfortunately I can't use *background and *hightlightColor, as other
    programs also use these resourcesnames.

    Or is there an easier way to "theme" motif?

    I hope it's clear what I mean. I'm not so good at explaining things :/

  2. Re: Specify a resource for all widgets, possible?

    Angelo Papenhoff wrote:
    > I hope it's clear what I mean. I'm not so good at explaining things :/

    On the contrary, it is quite clear.
    You can specify resources just for your application, and you
    do not need to specify each widget.
    This web page explains how to "theme" a motif text
    editor nedit:
    http://www.nedit.org/technotes/looks-1.php

    Hope this helps,

    Dušan Peterc
    http://www.arahne.si


  3. Re: Specify a resource for all widgets, possible?

    Angelo Papenhoff writes:

    >I tried to set the *XmPrimitive.background to #949494 but that didn't
    >do anything.
    >Unfortunately I can't use *background and *hightlightColor, as other
    >programs also use these resourcesnames.


    >Or is there an easier way to "theme" motif?


    This is entirely untested, but can you do something like
    *Xm*.background?
    --
    Aaron Hsu | Jabber: arcfide@jabber.org
    ``Government is the great fiction through which everybody endeavors to
    live at the expense of everybody else.'' - Frederic Bastiat

  4. Re: Specify a resource for all widgets, possible?

    On Mar 24, 8:30 pm, arahne wrote:
    > Angelo Papenhoff wrote:
    > > I hope it's clear what I mean. I'm not so good at explaining things :/

    >
    > On the contrary, it is quite clear.
    > You can specify resources just for your application, and you
    > do not need to specify each widget.
    > This web page explains how to "theme" a motif text
    > editor nedit:http://www.nedit.org/technotes/looks-1.php
    >
    > Hope this helps,
    >
    > Dušan Peterchttp://www.arahne.si


    It's not quite what I'm looking for.
    It explains how to all widgets in ONE application resources (i.e.
    nedit).
    For example: I set *XmPushButton.highlightColor to some color.
    Unfortunately I can't use *highlightColor because vi uses that
    resource, too.
    nedit*hightlightColor of course works, since the application was
    given.
    I somehow need a way to give resources to everything that begins with
    Xm.

  5. Re: Specify a resource for all widgets, possible?

    On Mar 24, 8:37 pm, Aaron Hsu wrote:
    > Angelo Papenhoff writes:
    > >I tried to set the *XmPrimitive.background to #949494 but that didn't
    > >do anything.
    > >Unfortunately I can't use *background and *hightlightColor, as other
    > >programs also use these resourcesnames.
    > >Or is there an easier way to "theme" motif?

    >
    > This is entirely untested, but can you do something like
    > *Xm*.background?
    > --
    > Aaron Hsu | Jabber: arcf...@jabber.org
    > ``Government is the great fiction through which everybody endeavors to
    > live at the expense of everybody else.'' - Frederic Bastiat


    Doesn't work :/

  6. Re: Specify a resource for all widgets, possible?

    Angelo Papenhoff wrote:

    > It explains how to all widgets in ONE application resources (i.e.
    > nedit).
    > For example: I set *XmPushButton.highlightColor to some color.
    > Unfortunately I can't use *highlightColor because vi uses that
    > resource, too.
    > nedit*hightlightColor of course works, since the application was
    > given.
    > I somehow need a way to give resources to everything that begins with
    > Xm.


    highlightColor is nedit specific, so it won't work with other
    applications.

    I found an older answer by Fred Kleinschmidt to similar question.
    You can use:
    *?*.XmPushButton.background: black
    which I have tested and it works.
    But it won't work with XmPrimitive.

    Best regards,

    Dušan Peterc
    http://www.arahne.si

+ Reply to Thread