GTKDIALOG - Red line creation
Related to script found here...
viewtopic.php?p=106321#p106321
I put together a script to show how to draw a horizontal red line across the window.
The width of the line is controlled by the variable WIDTH
Checked on Fatdog64 and Easy OS
Code: Select all
#!/bin/sh
export WORKDIR=$HOME/.line_example
if [ ! -d $WORKDIR ]; then
mkdir -p $WORKDIR
fi
echo 'gtk-icon-sizes="gtk-button=32,32"
' >> $WORKDIR/gtkrc
export GTK2_RC_FILES=$WORKDIR/gtkrc # make icons bigger
WIDTH=300 # make width less than window size
echo ' <svg> <rect width="'"$WIDTH"'" height='"'3'"' fill='"'#ff0000'"'/>
</svg>
' > /tmp/line.svg
export MAIN_DIALOG='<window title="Red line example" width-request="600">
<vbox>
<text><label>"Example of red line creation"</label></text>
<hbox homogeneous="true">
<pixmap space-expand="false" space-fill="false">
<input file>/tmp/line.svg</input></pixmap>
</hbox>
<hbox homogeneous="true">
<button relief="2" height-request="48" tooltip-text="Quit">
<label>'Quit'</label>
<input file stock="gtk-quit"></input>
<action>exit:EXIT</action>
</button>
</hbox>
</vbox>
</window>'
gtkdialog -p MAIN_DIALOG -c