1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* sample/tkextlib/tile/demo.rb: bug fix

* sample/tkextlib/tile/themes/*: add some themes (blue, keramik, and
  plastik; require Tile-0.5 or later).


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9614 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2005-11-25 07:05:22 +00:00
parent 9c5a4caf72
commit b244f5d57b
111 changed files with 716 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2005-11-25 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* sample/tkextlib/tile/demo.rb: bug fix
* sample/tkextlib/tile/themes/*: add some themes (blue,
keramik, and plastik; require Tile-0.5 or later).
2005-11-22 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* lib/tkextlib/tile.rb: bug fix (Tk::Tile::USE_TTK_NAMESPACE

View file

@ -5,7 +5,14 @@
require 'tk'
demodir = File.dirname($0)
Tk::AUTO_PATH.lappend('.', demodir, File.join(demodir, 'themes'))
themesdir = File.join(demodir, 'themes')
Tk::AUTO_PATH.lappend('.', demodir, themesdir)
Dir.foreach(themesdir){|name|
next if name == '.' || name == '..'
dir = File.join(themesdir, name)
Tk::AUTO_PATH.lappend(dir) if File.directory?(dir)
}
require 'tkextlib/tile'
@ -30,7 +37,8 @@ TkRoot.new{
# The descriptive names of the builtin themes.
$THEMELIST = [
['default', 'Classic'],
['default', 'Default'],
['classic', 'Classic'],
['alt', 'Revitalized'],
['winnative', 'Windows native'],
['xpnative', 'XP Native'],
@ -359,9 +367,9 @@ rb3 = Tk::Tile::Radiobutton.new(l, :text=>'Three',
btn = Tk::Tile::Button.new(l, :text=>'Button', :underline=>0)
mb = Tk::Tile::Menubutton.new(l, :text=>'Menubutton', :underline=>2)
#m = TkMenu.new(mb)
#mb.menu(m)
#fillMenu(m)
m = TkMenu.new(mb)
mb.menu(m)
fillMenu(m)
$entryText = TkVariable.new('Entry widget')
e = Tk::Tile::Entry.new(l, :textvariable=>$entryText)
@ -465,7 +473,11 @@ if version?('0.6')
if true
def progress.inverted(w, value)
w.value(w.maximum - value)
if w.mode == 'indeterminate'
w.value(value)
else
w.value(w.maximum - value)
end
end
scale.command {|value| progress.value(value)}
vscale.command {|value| progress.inverted(vprogress, value) }
@ -489,6 +501,10 @@ if version?('0.6')
:text=>'indeterminate', :value=>'indeterminate',
:command=>proc{pbMode(progress, vprogress)})
def pbMode(progress, vprogress)
if vprogress.mode != $V[:PBMODE]
vprogress.value(vprogress.maximum - vprogress.value)
end
progress.mode $V[:PBMODE]
vprogress.mode $V[:PBMODE]
end
@ -496,7 +512,8 @@ if version?('0.6')
start = Tk::Tile::Button.new(l, :text=>"Start",
:command=>proc{pbStart(progress, vprogress)})
def pbStart(progress, vprogress)
$V[:PBMODE] = 'indeterminate'; pbMode(progress, vprogress)
# $V[:PBMODE] = 'indeterminate'
pbMode(progress, vprogress)
progress.start 10
vprogress.start
end

View file

@ -1,3 +1,2 @@
All of *.tcl, themes/kroc.tcl and images (themes/kroc/*) are
quoted from Tcl/Tk's Tile extension.
Please read Orig_LICENSE.txt.
All of *.tcl and under themes/ directory (except kroc.rb) are
quoted from Tcl/Tk's Tile extension. Please read Orig_LICENSE.txt.

View file

@ -0,0 +1,149 @@
# blue.tcl - Copyright (C) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# blue.tcl,v 1.27 2005/10/08 14:56:57 jenglish Exp
#
#
namespace eval tile::theme::blue {
package provide tile::theme::blue 0.7
set imgdir [file join [file dirname [info script]] blue]
array set I [tile::LoadImages $imgdir *.gif]
array set colors {
-frame "#6699cc"
-lighter "#bcd2e8"
-window "#e6f3ff"
-selectbg "#ffff33"
-selectfg "#000000"
-disabledfg "#666666"
}
style theme create blue -settings {
style default . \
-borderwidth 1 \
-background $colors(-frame) \
-fieldbackground $colors(-window) \
-troughcolor $colors(-lighter) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
;
style map . -foreground [list disabled $colors(-disabledfg)]
## Buttons.
#
style default TButton -padding "10 0"
style layout TButton {
Button.button -children {
Button.focus -children {
Button.padding -children {
Button.label
}
}
}
}
style element create button image $I(button-n) \
-map [list pressed $I(button-p) active $I(button-h)] \
-border 4 -sticky ew
style element create Checkbutton.indicator image $I(check-nu) \
-width 24 -sticky w -map [list \
{!disabled active selected} $I(check-hc) \
{!disabled active} $I(check-hu) \
{!disabled selected} $I(check-nc) ]
style element create Radiobutton.indicator image $I(radio-nu) \
-width 24 -sticky w -map [list \
{!disabled active selected} $I(radio-hc) \
{!disabled active} $I(radio-hu) \
selected $I(radio-nc) ]
style default TMenubutton -relief raised -padding {10 2}
## Toolbar buttons.
#
style default Toolbutton \
-width 0 -relief flat -borderwidth 2 -padding 4 \
-background $colors(-frame) -foreground #000000 ;
style map Toolbutton -background [list active $colors(-selectbg)]
style map Toolbutton -foreground [list active $colors(-selectfg)]
style map Toolbutton -relief {
disabled flat
selected sunken
pressed sunken
active raised
}
## Entry widgets.
#
style default TEntry \
-selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont
style default TCombobox \
-selectborderwidth 1 -padding 2 -insertwidth 2 -font TkTextFont
## Notebooks.
#
style default TNotebook.Tab -padding {4 2 4 2}
style map TNotebook.Tab \
-background \
[list selected $colors(-frame) active $colors(-lighter)] \
-padding [list selected {4 4 4 2}]
## Labelframes.
#
style default TLabelframe -borderwidth 2 -relief groove
## Scrollbars.
#
style layout Vertical.TScrollbar {
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.trough -children {
Scrollbar.leftarrow -side left
Scrollbar.rightarrow -side right
Scrollbar.leftarrow -side right
Horizontal.Scrollbar.thumb -side left -expand true -sticky we
}
}
style element create Horizontal.Scrollbar.thumb image $I(sb-thumb) \
-map [list {pressed !disabled} $I(sb-thumb-p)] -border 3
style element create Vertical.Scrollbar.thumb image $I(sb-vthumb) \
-map [list {pressed !disabled} $I(sb-vthumb-p)] -border 3
foreach dir {up down left right} {
style element create ${dir}arrow image $I(arrow${dir}) \
-map [list \
disabled $I(arrow${dir}) \
pressed $I(arrow${dir}-p) \
active $I(arrow${dir}-h)] \
-border 1 -sticky {}
}
## Scales.
#
style element create Scale.slider \
image $I(slider) -map [list {pressed !disabled} $I(slider-p)]
style element create Vertical.Scale.slider \
image $I(vslider) -map [list {pressed !disabled} $I(vslider-p)]
style element create Horizontal.Progress.bar \
image $I(sb-thumb) -border 2
style element create Vertical.Progress.bar \
image $I(sb-vthumb) -border 2
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 315 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 329 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 323 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 330 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 313 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 770 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

View file

@ -0,0 +1,6 @@
# Package index for tile demo pixmap themes.
if {[file isdirectory [file join $dir blue]]} {
package ifneeded tile::theme::blue 0.0.1 \
[list source [file join $dir blue.tcl]]
}

View file

@ -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$
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

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 274 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 434 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 423 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 383 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 878 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 238 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 399 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

View file

@ -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$
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]]

View file

@ -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
# -------------------------------------------------------------------------

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 554 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 273 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 303 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

View file

@ -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$
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]]

View file

@ -0,0 +1,16 @@
# 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$
if {![file isdirectory [file join $dir plastik]]} { return }
if {![package vsatisfies [package provide Tcl] 8.4]} { return }
package ifneeded tile::theme::plastik 0.3.1 \
[list source [file join $dir plastik.tcl]]

View file

@ -0,0 +1,125 @@
# plastik.tcl - Copyright (C) 2004 Googie
#
# A sample pixmap theme for the tile package.
#
# Copyright (c) 2004 Googie
# Copyright (c) 2005 Pat Thoyts <patthoyts@users.sourceforge.net>
#
# $Id$
package require Tk 8.4
package require tile 0.5
namespace eval tile::theme::plastik {
variable version 0.3.1
package provide tile::theme::plastik $version
variable imgdir [file join [file dirname [info script]] plastik]
variable Images;
array set Images [tile::LoadImages $imgdir *.gif]
variable colors
array set colors {
-frame "#cccccc"
-disabledfg "#aaaaaa"
-selectbg "#657a9e"
-selectfg "#ffffff"
}
style theme create plastik -parent default -settings {
style default . \
-background $colors(-frame) \
-troughcolor $colors(-frame) \
-selectbackground $colors(-selectbg) \
-selectforeground $colors(-selectfg) \
-font TkDefaultFont \
-borderwidth 1 \
;
style map . -foreground [list disabled $colors(-disabledfg)]
#
# Layouts:
#
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 layout TButton {
Button.button -children {
Button.focus -children {
Button.padding -children {
Button.label -side left -expand true
}
}
}
}
#
# Elements:
#
style element create Button.button image $Images(button-n) \
-border 4 -sticky ew \
-map [list pressed $Images(button-p) active $Images(button-h)]
style element create Checkbutton.indicator image $Images(check-nu) \
-sticky {} -map [list \
{active selected} $Images(check-hc) \
{pressed selected} $Images(check-pc) \
active $Images(check-hu) \
selected $Images(check-nc) \
]
style element create Radiobutton.indicator image $Images(radio-nu) \
-sticky {} -map [list \
{active selected} $Images(radio-hc) \
{pressed selected} $Images(radio-pc) \
active $Images(radio-hu) \
selected $Images(radio-nc) \
]
style element create Horizontal.Scrollbar.thumb \
image $Images(hsb-n) -border 3 -sticky ew
style element create Vertical.Scrollbar.thumb \
image $Images(vsb-n) -border 3 -sticky ns
style element create Scale.slider \
image $Images(hslider-n) -sticky {}
style element create Vertical.Scale.slider \
image $Images(vslider-n) -sticky {}
style element create Scrollbar.uparrow image $Images(arrowup-n) \
-map [list pressed $Images(arrowup-p)] -sticky {}
style element create Scrollbar.downarrow image $Images(arrowdown-n) \
-map [list pressed $Images(arrowdown-p)] -sticky {}
style element create Scrollbar.leftarrow image $Images(arrowleft-n) \
-map [list pressed $Images(arrowleft-p)] -sticky {}
style element create Scrollbar.rightarrow image $Images(arrowright-n) \
-map [list pressed $Images(arrowright-p)] -sticky {}
#
# Settings:
#
style default TButton -width -10
style default TNotebook.Tab -padding {6 2 6 2}
style default TLabelframe -borderwidth 2 -relief groove
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 379 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 363 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 443 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 302 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Some files were not shown because too many files have changed in this diff Show more