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/keramik |
Fresh start
Diffstat (limited to 'jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik')
34 files changed, 209 insertions, 0 deletions
diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl new file mode 100644 index 0000000..6513a2f --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik.tcl @@ -0,0 +1,194 @@ +# keramik.tcl - +# +# A sample pixmap theme for the tile package. +# +# Copyright (c) 2004 Googie +# Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net> +# +# $Id: keramik.tcl 31689 2011-05-22 09:26:02Z nobu $ + +package require Tk 8.4; # minimum version for Tile +package require tile 0.5; # depends upon tile 0.5 + +namespace eval tile { + namespace eval theme { + namespace eval keramik { + variable version 0.3.2 + } + } +} + +namespace eval tile::theme::keramik { + + variable imgdir [file join [file dirname [info script]] keramik] + variable I + array set I [tile::LoadImages $imgdir *.gif] + + variable colors + array set colors { + -frame "#cccccc" + -lighter "#cccccc" + -window "#ffffff" + -selectbg "#eeeeee" + -selectfg "#000000" + -disabledfg "#aaaaaa" + } + + style theme create keramik -parent alt -settings { + + + # ----------------------------------------------------------------- + # Theme defaults + # + style default . \ + -borderwidth 1 \ + -background $colors(-frame) \ + -troughcolor $colors(-lighter) \ + -font TkDefaultFont \ + ; + + style map . -foreground [list disabled $colors(-disabledfg)] + + # ----------------------------------------------------------------- + # Button elements + # - the button has a large rounded border and needs a bit of + # horizontal padding. + # - the checkbutton and radiobutton have the focus drawn around + # the whole widget - hence the new layouts. + # + style layout TButton { + Button.background + Button.button -children { + Button.focus -children { + Button.label + } + } + } + style layout Toolbutton { + Toolbutton.background + Toolbutton.button -children { + Toolbutton.focus -children { + Toolbutton.label + } + } + } + style element create button image $I(button-n) \ + -border {8 6 8 16} -padding {6 6} -sticky news \ + -map [list {pressed !disabled} $I(button-p) \ + {active !selected} $I(button-h) \ + selected $I(button-s) \ + disabled $I(button-d)] + style default TButton -padding {10 6} + + style element create Toolbutton.button image $I(tbar-n) \ + -border {2 8 2 16} -padding {2 2} -sticky news \ + -map [list {pressed !disabled} $I(tbar-p) \ + {active !selected} $I(tbar-a) \ + selected $I(tbar-p)] + + style element create Checkbutton.indicator image $I(check-u) \ + -width 20 -sticky w \ + -map [list selected $I(check-c)] + + style element create Radiobutton.indicator image $I(radio-u) \ + -width 20 -sticky w \ + -map [list selected $I(radio-c)] + + # The layout for the menubutton is modified to have a button element + # drawn on top of the background. This means we can have transparent + # pixels in the button element. Also, the pixmap has a special + # region on the right for the arrow. So we draw the indicator as a + # sibling element to the button, and draw it after (ie on top of) the + # button image. + style layout TMenubutton { + Menubutton.background + Menubutton.button -children { + Menubutton.focus -children { + Menubutton.padding -children { + Menubutton.label -side left -expand true + } + } + } + Menubutton.indicator -side right + } + style element create Menubutton.button image $I(mbut-n) \ + -map [list {active !disabled} $I(mbut-a) \ + {pressed !disabled} $I(mbut-a) \ + {disabled} $I(mbut-d)] \ + -border {7 10 29 15} -padding {7 4 29 4} -sticky news + style element create Menubutton.indicator image $I(mbut-arrow-n) \ + -width 11 -sticky w -padding {0 0 18 0} + + # ----------------------------------------------------------------- + # Scrollbars, scale and progress elements + # - the scrollbar has three arrow buttons, two at the bottom and + # one at the top. + # + style layout Vertical.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.uparrow -side top + Scrollbar.downarrow -side bottom + Scrollbar.uparrow -side bottom + Vertical.Scrollbar.thumb -side top -expand true -sticky ns + } + } + + style layout Horizontal.TScrollbar { + Scrollbar.background + Scrollbar.trough -children { + Scrollbar.leftarrow -side left + Scrollbar.rightarrow -side right + Scrollbar.leftarrow -side right + Horizontal.Scrollbar.thumb -side left -expand true -sticky we + } + } + + style default TScrollbar -width 16 + + style element create Horizontal.Scrollbar.thumb image $I(hsb-n) \ + -border {6 4} -width 15 -height 16 -sticky news \ + -map [list {pressed !disabled} $I(hsb-p)] + + style element create Vertical.Scrollbar.thumb image $I(vsb-n) \ + -border {4 6} -width 16 -height 15 -sticky news \ + -map [list {pressed !disabled} $I(vsb-p)] + + style element create Scale.slider image $I(hslider-n) \ + -border 3 + + style element create Vertical.Scale.slider image $I(vslider-n) \ + -border 3 + + style element create Horizontal.Progress.bar image $I(hsb-n) \ + -border {6 4} + + style element create Vertical.Progress.bar image $I(vsb-n) \ + -border {4 6} + + style element create uparrow image $I(arrowup-n) \ + -map [list {pressed !disabled} $I(arrowup-p)] + + style element create downarrow image $I(arrowdown-n) \ + -map [list {pressed !disabled} $I(arrowdown-p)] + + style element create rightarrow image $I(arrowright-n) \ + -map [list {pressed !disabled} $I(arrowright-p)] + + style element create leftarrow image $I(arrowleft-n) \ + -map [list {pressed !disabled} $I(arrowleft-p)] + + # ----------------------------------------------------------------- + # Notebook elements + # + style element create tab image $I(tab-n) \ + -map [list selected $I(tab-p) active $I(tab-p)] \ + -border {6 6 6 2} -height 12 + + ## Labelframes. + # + style default TLabelframe -borderwidth 2 -relief groove + } +} + +package provide tile::theme::keramik $::tile::theme::keramik::version diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif Binary files differnew file mode 100644 index 0000000..2d84f29 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif Binary files differnew file mode 100644 index 0000000..52ee752 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowdown-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif Binary files differnew file mode 100644 index 0000000..ff309c5 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif Binary files differnew file mode 100644 index 0000000..2159f27 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowleft-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif Binary files differnew file mode 100644 index 0000000..905fa7e --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif Binary files differnew file mode 100644 index 0000000..0323332 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowright-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif Binary files differnew file mode 100644 index 0000000..20dcadb --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif Binary files differnew file mode 100644 index 0000000..129169e --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/arrowup-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif Binary files differnew file mode 100644 index 0000000..fe9bf98 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-d.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif Binary files differnew file mode 100644 index 0000000..210734d --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-h.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif Binary files differnew file mode 100644 index 0000000..5e1eafa --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif Binary files differnew file mode 100644 index 0000000..bfd7488 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif Binary files differnew file mode 100644 index 0000000..1095ed7 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/button-s.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif Binary files differnew file mode 100644 index 0000000..06e8795 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-c.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif Binary files differnew file mode 100644 index 0000000..3c02fcb --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/check-u.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif Binary files differnew file mode 100644 index 0000000..1d93973 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif Binary files differnew file mode 100644 index 0000000..18fbae0 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hsb-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif Binary files differnew file mode 100644 index 0000000..334e8e4 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/hslider-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif Binary files differnew file mode 100644 index 0000000..2e2f1c2 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-a.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif Binary files differnew file mode 100644 index 0000000..48197cb --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-arrow-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif Binary files differnew file mode 100644 index 0000000..4a294b4 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-d.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif Binary files differnew file mode 100644 index 0000000..65c0e4e --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/mbut-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif Binary files differnew file mode 100644 index 0000000..c8257c9 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-c.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif Binary files differnew file mode 100644 index 0000000..215a738 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/radio-u.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif Binary files differnew file mode 100644 index 0000000..03099a9 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif Binary files differnew file mode 100644 index 0000000..abec6ab --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tab-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif Binary files differnew file mode 100644 index 0000000..2c223ba --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-a.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif Binary files differnew file mode 100644 index 0000000..77ef8a2 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif Binary files differnew file mode 100644 index 0000000..3179b87 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/tbar-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif Binary files differnew file mode 100644 index 0000000..be01e4a --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif Binary files differnew file mode 100644 index 0000000..0bb39e9 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vsb-p.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif Binary files differnew file mode 100644 index 0000000..cf03d7f --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/keramik/vslider-n.gif diff --git a/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/pkgIndex.tcl new file mode 100644 index 0000000..e9e3dc2 --- /dev/null +++ b/jni/ruby/ext/tk/sample/tkextlib/tile/themes/keramik/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 keramik]]} { return } +if {![package vsatisfies [package provide Tcl] 8.4]} { return } + +package ifneeded tile::theme::keramik 0.3.2 \ + [list source [file join $dir keramik.tcl]] |