Edited
By talking to you about the button
I think the close button is redundant. Closing will be a mouse click on the widget
Delete: line 58 : <vbox><button><input file stock="gtk-quit"></input> <height>20</height><action type="exit">Exit on click close-box</action></button></vbox>
EDIT: line 61; <action signal="button-release-event">EXIT:exit</action>
Replace the path /usr/share/backgrounds/test.jpg in the below script with /path/to/image of your choice.
Code: Select all
#!/bin/bash
#set -x
# splash window example for GTK3 gtkdialog
# equivalent of GTK2_RC_FILES= (gtk2)
# some gtk3 css examples: https://docs.gtk.org/gtk3/css-overview.html
# text to display
msg="`echo -e "Besides being able to define color names,
the CSS parser is also able to read
different color expressions, which can
also be nested, providing a rich language
to define colors which are derived from a
set of base colors."`"
########################## gtk3 style theme css ############################
# create dir structure for write gtk.css inside
mkdir -p /tmp/gtk3-splash/share/themes/gtk-splash_gtkrc/gtk-3.0
# write gtk.css
echo '* {
font-family: DejaVu Sans; /* font name */
font-size: 12pt; /* font size */
font-style: italic;
font-weight: bold;
color: rgba(255, 255, 255, 1); /* font color */
padding: 0px;
margin: 0px;
}
window {
background-image: url("/usr/share/backgrounds/test.jpg"); /* image path */
box-shadow: 0px 0px 0px 10px rgba(255, 255, 255, 0.5); /* box shade color */
background-repeat: no-repeat; /* image is not repeated */
background-position: center; /* font size */
background-size: 100% 100%; /* image size */
border: 5px ridge; /* border thickness , border style:solid,double,ridge,inset,outset,groove */
border-radius: 10px; /* corner rounding */
border-color: #EDAE36; /* color border */
}
' > /tmp/gtk3-splash/share/themes/gtk-splash_gtkrc/gtk-3.0/gtk.css
export GTK_DATA_PREFIX=/tmp/gtk3-splash # gtk3 prefix, can be any folder name
export GTK_THEME=gtk-splash_gtkrc # gtk3 theme name
##################################################################
export GTKDIALOG_SPLASH='
<window title="box_splash" type-hint="6" focus-on-map="false" skip-taskbar-hint="true" icon-name="gtk-preferences" resizable="false" decorated="false">
<vbox>
<notebook show-tabs="false" show-border="true" space-expand="true" space-fill="true">
<hbox>
<vbox>
<pixmap width-request="-1" space-expand="true" space-fill="true">
<width>-1</width>
<input file stock="gtk-info"></input>
</pixmap>
</vbox>
<text justify="0" width-chars="0" wrap="false" space-expand="true" space-fill="true">
<label>"'$msg'"</label>
</text>
</hbox>
</notebook>
</vbox>
<action signal="button-release-event">EXIT:exit</action>
</window>'
exec gtkdialog --class=gtkdialog-splash -p GTKDIALOG_SPLASH --center --geometry=500x210