How to put color in GTKDIALOG

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Message
Author
User avatar
don570
Posts: 5528
Joined: Wed 10 Mar 2010, 19:58
Location: Ontario

#21 Post by don570 »

egrep command can be used as well to check for a dark theme

This script will change the color of text according to gtk theme.
Certain theme names will trigger the change. Blue turns to orange.

Code: Select all

#!/bin/sh
export COLOUR=3272C0
[ "`egrep "Stardust_dark_mouse|Stardust_dark_touch|Azenis|TerraNova-Aquarius|terminus|Murrina-Black|DarkRoomCompact|PenOSmaster" /root/.gtkrc-2.0`"  ] && COLOUR=FFD900

 export MAIN_DIALOG='
<window title="Example"  window-position="1">
 <vbox>
<text use-markup="true"><label>"<b><span size='"'x-large'"'>p</span><span size='"'x-large'"' color='"'#$COLOUR'"'>Archive</span></b>"</label></text>
</vbox>
</window>' 
 
 gtkdialog -p MAIN_DIALOG 
 
Image

Post Reply