Unnamed Fossil Project

Artifact [f147218de9]
Login

Artifact [f147218de9]

Artifact f147218de9e1e5b9e42d156e569f45d05f84fa76be58dc0a72bdec72c97c26ca:


# kroc.tcl - Copyright (C) 2004 David Zolli <kroc@kroc.tk>
#
# A sample pixmap theme for the tile package.

package require tile::pixmap

namespace eval tile {
    namespace eval kroc {
        variable version 0.0.1
    }
}

namespace eval tile::kroc {
    
    set imgdir [file join [file dirname [info script]] kroc]
    array set Images [tile::LoadImages $imgdir *.gif]
    
    style theme create kroc -parent alt -settings {
        
        style default . -background #FCB64F -troughcolor #F8C278 -borderwidth 1
        style map . -background [list active #694418]
        style map . -foreground [list disabled #FFE6BA]
        
        style default TButton -padding "10 0"
        
        style default Tab.TNotebook -padding {10 3} -font ButtonFont
        style map Tab.TNotebook \
                -background \
                [list selected #FCB64F {} #FFE6BA] \
                -padding [list selected {12 6 12 3}]
        
        style default TScrollbar -width 5
        style map TScrollbar \
                -relief		{ pressed sunken } \
                -arrowcolor	{ pressed #F8C278 } \
                ;
        
        style layout Vertical.TScrollbar {
            Scrollbar.background
            Scrollbar.trough -children {
                Scrollbar.uparrow -side top
                Scrollbar.downarrow -side bottom
                Scrollbar.uparrow -side bottom
                Scrollbar.thumb -side top -expand true
            }
        }
        
        style layout Horizontal.TScrollbar {
            Scrollbar.background
            Scrollbar.trough -children {
                Scrollbar.leftarrow -side left
                Scrollbar.rightarrow -side right
                Scrollbar.leftarrow -side right
                Scrollbar.thumb -side left -expand true
            }
        }
        
        #
        # Elements:
        #
        style element create Button.background pixmap -images [list  \
                pressed $Images(button-p) \
                active	$Images(button-h) \
                {} $Images(button-n) \
                ] -border 4 -tiling tile
        
        style element create Checkbutton.indicator pixmap -images [list \
                {active selected} 	$Images(check-hc) \
                active			$Images(check-hu) \
                selected		$Images(check-nc) \
                {}                 	$Images(check-nu) \
                ] -tiling fixed
        
        style element create Radiobutton.indicator pixmap -images [list \
                {active selected} 	$Images(radio-hc) \
                active			$Images(radio-hu) \
                selected		$Images(radio-nc) \
                {}                 	$Images(radio-nu) \
                ] -tiling fixed
        
        
        #
        # Settings:
        #
        style layout TButton {
            Button.background
            Button.highlight -children {
                Button.padding -children {
                    Button.label -side left -expand true
                }
            }
        }
        
        style layout TCheckbutton {
            Checkbutton.background
            Checkbutton.highlight -children {
                Checkbutton.border -children {
                    Checkbutton.padding -children {
                        Checkbutton.indicator -side right
                        Checkbutton.label -side left -expand true
                    }
                }
            }
        }
        
        style layout TRadiobutton {
            Radiobutton.background
            Radiobutton.border -children {
                Radiobutton.padding -children  {
                    Radiobutton.indicator -side right
                    Radiobutton.highlight -expand true -sticky {} -children {
                        Radiobutton.label -side right -expand true
                    }
                }
            }
        }
        
    } }

# -------------------------------------------------------------------------

package provide tile::theme::kroc $::tile::kroc::version

# -------------------------------------------------------------------------