Call a custom gtkrc-2.0 file at yad runtime?

287 views
Skip to first unread message

FFRR

unread,
Feb 20, 2016, 3:58:53 PM2/20/16
to yad-common
Hi

Have had a darn good search on this (on interweb) but can't find a solution that works. I know this is not strictly a yad problem, but I am hoping there is expertise here to advise me. 

I have a yad that needs a black background and faded orange on select of buttons.

I have successfully written the needed changes and added these to the standard gtkrc-2.0 file and it works, but affects other programs with the yad-dialog-window widget.

#makes dialog window black
style "yad-dialog-window" {
  bg[NORMAL] = "#000000"
}
widget "*yad-dialog-window" style "yad-dialog-window"

#makes button surround black and red when clicked
style "yad-form-button" {
  bg[NORMAL] = "#000000"
  bg[PRELIGHT] = "#000000"
  bg[ACTIVE] = shade(0.15,"orange")
}
widget "*yad-form-button" style "yad-form-button"


Want to only call the changes needed when I call the yad that needs the black background.

Have seen the way to do this is to use:

bash -c 'GTK2_RC_FILES=$HOME/custom.rc yad...'


but this doesn't work for me? Any help welcome :)

Victor Ananjevsky

unread,
Feb 21, 2016, 3:41:40 AM2/21/16
to yad-c...@googlegroups.com
put your gtk settings to separate file and use --gtkrc option for
set/change settings only for one dialog
> --
> You received this message because you are subscribed to the Google Groups "yad-common" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to yad-common+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


--
Victor Ananjevsky <anan...@gmail.com>

FFRR

unread,
Feb 21, 2016, 4:48:01 AM2/21/16
to yad-common
Brilliant- how did I miss that :)

Inititally my filename with settings was called .gtkrc-2.0-yad and this didn't work so renamed to gtkrc-yad and it did. Hidden file?

Many thanks Victor, and keep up the great work on this ever useful project :)

Tim 
Reply all
Reply to author
Forward
0 new messages