|
From: Mats B. <ma...@pr...> - 2006-05-09 08:50:10
|
Joe English wrote: > > In conjunction with this, I'd like to define a set of predefined > custom styles that users can count on being present in > every theme. Right now there's just one -- Toolbutton -- > but there are many others that would be useful. Suggestions > welcome. > Url style buttons perhaps (from coccinella.sf.net and coccinella/contrib/tileutils.tcl): # Url clickable link: style layout Url { Url.background -children { Url.padding -children { Url.label } } } style configure Url \ -padding 2 -relief flat -font $fonts(underlineDefault) -foreground blue style map Url -foreground [list active red] style configure Small.Url -font $fonts(underlineSmall) More examples: Headlabel--- style layout Headlabel { Headlabel.border -children { Headlabel.padding -children { Headlabel.label -side left } } } style configure Headlabel \ -font CociLargeFont -padding {20 6 20 6} -anchor w -space 12 Popupbutton--- style layout Popupbutton { Popupbutton.border -children { Popupbutton.padding -children { Popupbutton.Combobox.downarrow } } } style configure Popupbutton -padding 6 Minimenubutton--- # This is a toolbutton style menubutton with a small downarrow. style layout MiniMenubutton { Toolbutton.border -sticky nswe -children { Toolbutton.padding -sticky nswe -children { MiniMenubutton.indicator -side right Toolbutton.label -sticky nswe } } } style element create MiniMenubutton.indicator image $tiles(downArrow) \ -sticky e -padding {6 2} style configure MiniMenubutton -padding 6 Mats |