diff options
author | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-16 18:49:26 +0900 |
---|---|---|
committer | Jari Vetoniemi <jari.vetoniemi@indooratlas.com> | 2020-03-30 00:39:06 +0900 |
commit | fcbf63e62c627deae76c1b8cb8c0876c536ed811 (patch) | |
tree | 64cb17de3f41a2b6fef2368028fbd00349946994 /jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc |
Fresh start
Diffstat (limited to 'jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc')
13 files changed, 178 insertions, 0 deletions
diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl new file mode 100644 index 0000000..b2cd796 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc.tcl @@ -0,0 +1,163 @@ +# 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] + + if {[package vsatisfies [package provide tile] 0.5]} { + set TNoteBook_Tab TNotebook.Tab + } else { + set TNoteBook_Tab Tab.TNotebook + } + + style theme create kroc -parent alt -settings { + + style default . -background #FCB64F -troughcolor #F8C278 -borderwidth 1 + style default . -font TkDefaultFont -borderwidth 1 + style map . -background [list active #694418] + style map . -foreground [list disabled #B2B2B2 active #FFE7CB] + + style default TButton -padding "10 4" + + style default $TNoteBook_Tab -padding {10 3} -font TkDefaultFont + style map $TNoteBook_Tab \ + -background [list selected #FCB64F {} #FFE6BA] \ + -foreground [list {} black] \ + -padding [list selected {10 6 10 3}] + + style map TScrollbar \ + -background { pressed #694418} \ + -arrowcolor { pressed #FFE7CB } \ + -relief { pressed sunken } \ + ; + + style layout Vertical.TScrollbar { + 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.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Scrollbar.thumb -side left -expand true + } + } + + # + # Elements: + # + if {[package vsatisfies [package provide tile] 0.5]} { + + style element create Button.button image $Images(button-n) \ + -map [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + ] -border 3 -sticky ew + + style element create Checkbutton.indicator image $Images(check-nu) \ + -map [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {active selected} $Images(check-hc) \ + active $Images(check-hu) \ + selected $Images(check-nc) \ + ] -sticky w + + style element create Radiobutton.indicator image $Images(radio-nu) \ + -map [list \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + ] -sticky w + + } else { + + style element create Button.button pixmap -images [list \ + pressed $Images(button-p) \ + active $Images(button-h) \ + {} $Images(button-n) \ + ] -border 3 -tiling tile + + style element create Checkbutton.indicator pixmap -images [list \ + {pressed selected} $Images(check-nc) \ + pressed $Images(check-nu) \ + {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 \ + {pressed selected} $Images(radio-nc) \ + pressed $Images(radio-nu) \ + {active selected} $Images(radio-hc) \ + active $Images(radio-hu) \ + selected $Images(radio-nc) \ + {} $Images(radio-nu) \ + ] -tiling fixed + + } + + # + # Settings: (*button.background is not needed in tile 0.5 or above) + # + style layout TButton { + Button.button -children { + Button.focus -children { + Button.padding -children { + Button.label -expand true -sticky {} + } + } + } + } + + style layout TCheckbutton { + Checkbutton.border -children { + Checkbutton.background + Checkbutton.padding -children { + Checkbutton.indicator -side left + Checkbutton.focus -side left -children { + Checkbutton.label + } + } + } + } + + style layout TRadiobutton { + Radiobutton.border -children { + Radiobutton.background + Radiobutton.padding -children { + Radiobutton.indicator -side left + Radiobutton.focus -expand true -sticky w -children { + Radiobutton.label -side right -expand true + } + } + } + } + + } } + +# ------------------------------------------------------------------------- + +package provide tile::theme::kroc $::tile::kroc::version + +# ------------------------------------------------------------------------- diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif Binary files differnew file mode 100644 index 0000000..e7a140d --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-h.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif Binary files differnew file mode 100644 index 0000000..78b506d --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif Binary files differnew file mode 100644 index 0000000..a5a4e90 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/button-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif Binary files differnew file mode 100644 index 0000000..41503c5 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hc.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif Binary files differnew file mode 100644 index 0000000..b3e512c --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-hu.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif Binary files differnew file mode 100644 index 0000000..a28c288 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nc.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif Binary files differnew file mode 100644 index 0000000..5c23931 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/check-nu.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif Binary files differnew file mode 100644 index 0000000..359fe1c --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hc.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif Binary files differnew file mode 100644 index 0000000..9f46b37 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-hu.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif Binary files differnew file mode 100644 index 0000000..6437f33 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nc.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif Binary files differnew file mode 100644 index 0000000..2d2aac8 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/kroc/radio-nu.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl new file mode 100644 index 0000000..95c3d57 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/kroc/pkgIndex.tcl @@ -0,0 +1,15 @@ +# pkgIndex.tcl for additional tile pixmap themes. +# +# We don't provide the package is the image subdirectory isn't present, +# or we don't have the right version of Tcl/Tk +# +# To use this automatically within tile, the tile-using application should +# use tile::availableThemes and tile::setTheme +# +# $Id: pkgIndex.tcl 31689 2011-05-22 09:26:02Z nobu $ + +if {![file isdirectory [file join $dir kroc]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::kroc 0.0.1 \ + [list source [file join $dir kroc.tcl]] |