3
# A sample pixmap theme for the tile package.
5
# Copyright (c) 2004 Googie
6
# Copyright (c) 2004 Pat Thoyts <patthoyts@users.sourceforge.net>
8
# $Id: keramik.tcl 11708 2007-02-12 23:01:19Z shyouhei $
10
package require Tk 8.4; # minimum version for Tile
11
package require tile 0.5; # depends upon tile 0.5
14
namespace eval theme {
15
namespace eval keramik {
16
variable version 0.3.2
21
namespace eval tile::theme::keramik {
23
variable imgdir [file join [file dirname [info script]] keramik]
25
array set I [tile::LoadImages $imgdir *.gif]
37
style theme create keramik -parent alt -settings {
40
# -----------------------------------------------------------------
45
-background $colors(-frame) \
46
-troughcolor $colors(-lighter) \
50
style map . -foreground [list disabled $colors(-disabledfg)]
52
# -----------------------------------------------------------------
54
# - the button has a large rounded border and needs a bit of
56
# - the checkbutton and radiobutton have the focus drawn around
57
# the whole widget - hence the new layouts.
59
style layout TButton {
61
Button.button -children {
62
Button.focus -children {
67
style layout Toolbutton {
69
Toolbutton.button -children {
70
Toolbutton.focus -children {
75
style element create button image $I(button-n) \
76
-border {8 6 8 16} -padding {6 6} -sticky news \
77
-map [list {pressed !disabled} $I(button-p) \
78
{active !selected} $I(button-h) \
79
selected $I(button-s) \
80
disabled $I(button-d)]
81
style default TButton -padding {10 6}
83
style element create Toolbutton.button image $I(tbar-n) \
84
-border {2 8 2 16} -padding {2 2} -sticky news \
85
-map [list {pressed !disabled} $I(tbar-p) \
86
{active !selected} $I(tbar-a) \
89
style element create Checkbutton.indicator image $I(check-u) \
91
-map [list selected $I(check-c)]
93
style element create Radiobutton.indicator image $I(radio-u) \
95
-map [list selected $I(radio-c)]
97
# The layout for the menubutton is modified to have a button element
98
# drawn on top of the background. This means we can have transparent
99
# pixels in the button element. Also, the pixmap has a special
100
# region on the right for the arrow. So we draw the indicator as a
101
# sibling element to the button, and draw it after (ie on top of) the
103
style layout TMenubutton {
104
Menubutton.background
105
Menubutton.button -children {
106
Menubutton.focus -children {
107
Menubutton.padding -children {
108
Menubutton.label -side left -expand true
112
Menubutton.indicator -side right
114
style element create Menubutton.button image $I(mbut-n) \
115
-map [list {active !disabled} $I(mbut-a) \
116
{pressed !disabled} $I(mbut-a) \
117
{disabled} $I(mbut-d)] \
118
-border {7 10 29 15} -padding {7 4 29 4} -sticky news
119
style element create Menubutton.indicator image $I(mbut-arrow-n) \
120
-width 11 -sticky w -padding {0 0 18 0}
122
# -----------------------------------------------------------------
123
# Scrollbars, scale and progress elements
124
# - the scrollbar has three arrow buttons, two at the bottom and
127
style layout Vertical.TScrollbar {
129
Scrollbar.trough -children {
130
Scrollbar.uparrow -side top
131
Scrollbar.downarrow -side bottom
132
Scrollbar.uparrow -side bottom
133
Vertical.Scrollbar.thumb -side top -expand true -sticky ns
137
style layout Horizontal.TScrollbar {
139
Scrollbar.trough -children {
140
Scrollbar.leftarrow -side left
141
Scrollbar.rightarrow -side right
142
Scrollbar.leftarrow -side right
143
Horizontal.Scrollbar.thumb -side left -expand true -sticky we
147
style default TScrollbar -width 16
149
style element create Horizontal.Scrollbar.thumb image $I(hsb-n) \
150
-border {6 4} -width 15 -height 16 -sticky news \
151
-map [list {pressed !disabled} $I(hsb-p)]
153
style element create Vertical.Scrollbar.thumb image $I(vsb-n) \
154
-border {4 6} -width 16 -height 15 -sticky news \
155
-map [list {pressed !disabled} $I(vsb-p)]
157
style element create Scale.slider image $I(hslider-n) \
160
style element create Vertical.Scale.slider image $I(vslider-n) \
163
style element create Horizontal.Progress.bar image $I(hsb-n) \
166
style element create Vertical.Progress.bar image $I(vsb-n) \
169
style element create uparrow image $I(arrowup-n) \
170
-map [list {pressed !disabled} $I(arrowup-p)]
172
style element create downarrow image $I(arrowdown-n) \
173
-map [list {pressed !disabled} $I(arrowdown-p)]
175
style element create rightarrow image $I(arrowright-n) \
176
-map [list {pressed !disabled} $I(arrowright-p)]
178
style element create leftarrow image $I(arrowleft-n) \
179
-map [list {pressed !disabled} $I(arrowleft-p)]
181
# -----------------------------------------------------------------
184
style element create tab image $I(tab-n) \
185
-map [list selected $I(tab-p) active $I(tab-p)] \
186
-border {6 6 6 2} -height 12
190
style default TLabelframe -borderwidth 2 -relief groove
194
package provide tile::theme::keramik $::tile::theme::keramik::version