eumandy/eugtk/examples/test158.ex

43 lines
1.0 KiB
Elixir
Raw Normal View History

2016-11-25 00:33:18 -07:00
-----------------------------------------------------------------
--# More CSS styling - this uses a linear gradient background
-----------------------------------------------------------------
include GtkEngine.e
constant css = locate_file("resources/mystyle3.css")
constant docs = `<u><b>Linear Gradient</b></u>
and css styling from 'mystyle3.css'`
constant win = create(GtkWindow,"size=300x200,position=1,$destroy=Quit")
constant panel = create(GtkBox,"orientation=VERTICAL,margin=10")
add(win,panel)
constant lbl0 = create(GtkLabel,"name=docs,margin=10,font=8")
set(lbl0,"markup",docs)
pack(panel,lbl0)
constant lbl1 = create(GtkLabel,"markup=MOO?,name=moo")
pack(panel,lbl1)
constant cow = create(GtkImage,"thumbnails/cowbell.png")
pack(panel,cow)
constant btn1 = create(GtkButton,"gtk-quit","Quit")
constant btnbox = create(GtkButtonBox)
add(btnbox,btn1)
pack(panel,-btnbox)
constant cssp = create(GtkCssProvider,css)
display(read_file(css)) -- optional: show css on terminal
show_all(win)
main()