Bwidget Source Code
Check-in [bd460bc3a4]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:*** continous developement, minor changes
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: bd460bc3a4660418d1369ebb037a4b90e8b9182f
User & Date: oberdorfer 2009-10-25 20:53:27
Context
2009-10-25
20:54
*** continous developement, some small improvements check-in: 9c53cf5397 user: oberdorfer tags: trunk
20:53
*** continous developement, minor changes check-in: bd460bc3a4 user: oberdorfer tags: trunk
19:21
ongoing developement check-in: 704815e7b7 user: oberdorfer tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to demo/basic.tcl.

1
2
3
4
5
6
7
8
9
10
11
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ----------------------------------------------------------------------------
#  basic.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: basic.tcl,v 1.3 2009/09/08 21:22:29 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

namespace eval DemoBasic {
    variable var
    variable count 0
    variable id    ""
................................................................................
proc DemoBasic::_button { parent } {
    variable var

    set frame [BWidget::wrap frame $parent.butfr]
    set but   [Button $frame.but -text "Press me!" \
                   -repeatdelay 300 \
                   -command  "DemoBasic::_butcmd command" \
                   -helptext "This is a Button widget"]
    set sep1  [Separator $frame.sep1 -orient vertical]
    set arr1  [ArrowButton $frame.arr1 -type button \
                   -width 25 -height 25 \
                   -repeatdelay 300 \
                   -command  "DemoBasic::_butcmd command" \
                   -helptext "This is an ArrowButton widget\nof type button"]
    set sep2  [Separator $frame.sep2 -orient vertical]


|







 







|







1
2
3
4
5
6
7
8
9
10
11
..
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# ----------------------------------------------------------------------------
#  basic.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: basic.tcl,v 1.4 2009/10/25 20:53:58 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

namespace eval DemoBasic {
    variable var
    variable count 0
    variable id    ""
................................................................................
proc DemoBasic::_button { parent } {
    variable var

    set frame [BWidget::wrap frame $parent.butfr]
    set but   [Button $frame.but -text "Press me!" \
                   -repeatdelay 300 \
                   -command  "DemoBasic::_butcmd command" \
                   -helptext "This is a Button widget" -relief link]
    set sep1  [Separator $frame.sep1 -orient vertical]
    set arr1  [ArrowButton $frame.arr1 -type button \
                   -width 25 -height 25 \
                   -repeatdelay 300 \
                   -command  "DemoBasic::_butcmd command" \
                   -helptext "This is an ArrowButton widget\nof type button"]
    set sep2  [Separator $frame.sep2 -orient vertical]

Changes to demo/demo.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15




16
17
18
19
20
21
22
#!/bin/sh
# The next line is executed by /bin/sh, but not tcl \
exec wish "$0" ${1+"[email protected]"}

# ----------------------------------------------------------------------------
#  demo.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: demo.tcl,v 1.6 2009/09/08 21:22:09 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

set appDir [file dirname [info script]]
lappend auto_path [file join $appDir ".."]

package require BWidget 1.9.1





source [file join $appDir "demo_main.tcl"]

Demo::main
Demo::setTheme

wm geom . [wm geom .]






|







>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/sh
# The next line is executed by /bin/sh, but not tcl \
exec wish "$0" ${1+"[email protected]"}

# ----------------------------------------------------------------------------
#  demo.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: demo.tcl,v 1.7 2009/10/25 20:53:58 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

set appDir [file dirname [info script]]
lappend auto_path [file join $appDir ".."]

package require BWidget 1.9.1

::BWidget::use \
    -setoptdb  yes


source [file join $appDir "demo_main.tcl"]

Demo::main
Demo::setTheme

wm geom . [wm geom .]

Changes to demo/demo_main.tcl.

1
2
3
4
5
6
7
8
9
10
11
..
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55

56
57
58
59
60
61
62
63
64
65
66
67
68
69


70
71

72
73
74
75
76
77
78
79
80
81
82
83

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
...
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# ----------------------------------------------------------------------------
#  manager.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: demo_main.tcl,v 1.1 2009/09/08 21:22:09 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

namespace eval Demo {
    variable _wfont

    variable notebook
................................................................................
    foreach script {
	manager.tcl basic.tcl select.tcl dnd.tcl tree.tcl tmpldlg.tcl
    } {
	namespace inscope :: source $DEMODIR/$script
    }

    variable THEME_DIR [file join $appDir "themes"]
    variable CTHEME "default"
}


proc Demo::_get_available_themes { } {
  variable THEME_DIR
  set themes [list default]
  
  if { [BWidget::using ttk] } {
      foreach dir [glob -nocomplain [file join $THEME_DIR "*"]] {
        if { [file isdirectory $dir] } {
           lappend themes [file tail $dir]
      }}
  } else {
      foreach dcls [BWidget::get_colordcls] {
          if { [lsearch $themes $dcls] == -1 } {
              lappend themes $dcls
      }}
  }

  return $themes

}


proc Demo::setTheme { {newtheme ""} } {
  variable CTHEME

  if { ![llength [set themes [_get_available_themes]]] } {
      return
  }

  if { ![string length $newtheme] } {
      set newtheme $CTHEME
  }



  if { [lsearch $themes $newtheme] == -1} {
      set newtheme [lindex $themes 0]

  }

  if { [BWidget::using ttk] } {

      namespace inscope :: package require ttk::theme::${newtheme}
      ttk::setTheme $newtheme

  } else {

      set BWidget::colors(style) $newtheme
      event generate . <<ThemeChanged>>
  }  

}


proc Demo::create { } {
    global   tk_patchLevel
    variable _wfont
    variable notebook
    variable mainframe
    variable font
    variable prgtext
    variable prgindic
    variable CTHEME

    set prgtext "Please wait while loading font..."
    set prgindic -1
    _create_intro
    update
    SelectFont::loadfont

................................................................................
    set _wfont [SelectFont $tb2.font -type toolbar \
                    -command "Demo::update_font \[$tb2.font cget -font\]"]
    set font   [$_wfont cget -font]
    pack $_wfont -side left -anchor w

    BWidget::wrap label $tb2.l -text "Theme: "
    ComboBox $tb2.cb \
           -values "[[namespace current]::_get_available_themes]" \
	   -text $CTHEME \
	   -modifycmd "[namespace current]::setTheme \[$tb2.cb cget -text\]" \
           -editable 0 \
	   -hottrack 1

        pack $tb2.cb $tb2.l -side right

    $mainframe addindicator -text "BWidget [package version BWidget]"


|







 







<
<
<
<
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
>




|

<
<
<
<

|


>
>
|
<
>


<
<
<
<
<
<
<
<
<
<
>











|







 







|
|







1
2
3
4
5
6
7
8
9
10
11
..
28
29
30
31
32
33
34





35

36













37
38
39
40
41
42
43




44
45
46
47
48
49
50

51
52
53










54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
...
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# ----------------------------------------------------------------------------
#  manager.tcl
#  This file is part of Unifix BWidget Toolkit
#  $Id: demo_main.tcl,v 1.2 2009/10/25 20:53:58 oberdorfer Exp $
# ----------------------------------------------------------------------------
#

namespace eval Demo {
    variable _wfont

    variable notebook
................................................................................
    foreach script {
	manager.tcl basic.tcl select.tcl dnd.tcl tree.tcl tmpldlg.tcl
    } {
	namespace inscope :: source $DEMODIR/$script
    }

    variable THEME_DIR [file join $appDir "themes"]





    variable ctheme















    set ctheme $::BWidget::colors(style)
}


proc Demo::setTheme { {newtheme ""} } {
  variable ctheme





  if { ![string length $newtheme] } {
      set newtheme $ctheme
  }

  # just in case - (maybe usefull during developement) ...
  if { ![llength [set themes [BWidget::getAvailableThemes]]] ||
        [lsearch $themes $newtheme] == -1} {

      return -code error "color/style declaration is incomplete!"
  }











  BWidget::set_themedefaults $newtheme
}


proc Demo::create { } {
    global   tk_patchLevel
    variable _wfont
    variable notebook
    variable mainframe
    variable font
    variable prgtext
    variable prgindic
    variable ctheme

    set prgtext "Please wait while loading font..."
    set prgindic -1
    _create_intro
    update
    SelectFont::loadfont

................................................................................
    set _wfont [SelectFont $tb2.font -type toolbar \
                    -command "Demo::update_font \[$tb2.font cget -font\]"]
    set font   [$_wfont cget -font]
    pack $_wfont -side left -anchor w

    BWidget::wrap label $tb2.l -text "Theme: "
    ComboBox $tb2.cb \
           -values [BWidget::getAvailableThemes] \
	   -text $ctheme \
	   -modifycmd "[namespace current]::setTheme \[$tb2.cb cget -text\]" \
           -editable 0 \
	   -hottrack 1

        pack $tb2.cb $tb2.l -side right

    $mainframe addindicator -text "BWidget [package version BWidget]"

Changes to demo/demo_tile.tcl.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# The next line is executed by /bin/sh, but not tcl \
exec wish "$0" ${1+"[email protected]"}

set appDir [file dirname [info script]]
lappend auto_path [file join $appDir ".."]

set dir [file join $appDir "themes"]
if {[lsearch -exact auto_path $dir] == -1} {
    lappend auto_path $dir
}

package require tile 0.8

package require BWidget 1.9.1
::BWidget::usepackage ttk

source [file join $appDir "demo_main.tcl"]

Demo::main
after idle Demo::setTheme

wm geom . [wm geom .]






|
|
|
|
|
|
|
|
<







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

16
17
18
19
20
21
22
#!/bin/sh
# The next line is executed by /bin/sh, but not tcl \
exec wish "$0" ${1+"[email protected]"}

set appDir [file dirname [info script]]
lappend auto_path [file join $appDir ".."]


package require BWidget 1.9.1

::BWidget::use \
    -package   "ttk" \
    -style     "native" \
    -themedirs [list [file join $appDir "themes"]] \
    -setoptdb  yes


source [file join $appDir "demo_main.tcl"]

Demo::main
after idle Demo::setTheme

wm geom . [wm geom .]

Changes to demo/themes/aquativo/CreateImageLib.def.

12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

32
33
34
arrow_up_normal
button
buttonNorm
buttonPressed
checkbox_checked
checkbox_unchecked
horizontal_trough
hseparator-a
hseparator-n
menubar_option
menubar_option_arrow
menubar_option_arrow_insensitive
notebook
notebook_active
option_in
option_out
progressbar
scrollbar_horizontal
scrollbar_horizontal_inactive
scrollbar_vertical

vertical_trough
vseparator-a
vseparator-n






|
<











>

|
<
12
13
14
15
16
17
18
19

20
21
22
23
24
25
26
27
28
29
30
31
32
33

arrow_up_normal
button
buttonNorm
buttonPressed
checkbox_checked
checkbox_unchecked
horizontal_trough
hseparator

menubar_option
menubar_option_arrow
menubar_option_arrow_insensitive
notebook
notebook_active
option_in
option_out
progressbar
scrollbar_horizontal
scrollbar_horizontal_inactive
scrollbar_vertical
scrollbar_vertical_inactive
vertical_trough
vseparator

Changes to demo/themes/aquativo/aquativo.tcl.

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
71
72
73
74
75
76
77

78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131

132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148

149
150
151
152
153
154
155
156



157
158
159
160


161
162



163
164
165
166
167
168
169
170
...
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201


202
203
204
205
206
207
208
#   Copyright (C) 2004 Pat Thoyts <pat[email protected]>
#
#   Import the aquativo Gtk theme (C) Andrew Wyatt, FEWT Software
#   Original: http://www.fewt.com
#   Link: http://art.gnome.org/themes/gtk2/432.php
# ------------------------------------------------------------------------------
# Revision change history:
#   $Id: aquativo.tcl,v 1.3 2009/10/25 19:10:41 oberdorfer Exp $
#
#   Aug.'08: code refractured for the use with >= tk8.5,
#            [email protected]
# ------------------------------------------------------------------------------

package require Tk 8.4;                 # minimum version for Tile
package require tile 0.8;               # depends upon tile
................................................................................
        -font TkDefaultFont \
        -background "#fafafa" \
        -foreground "Black"
    
    # I really like the mapping options!
    ::ttk::style map "." \
        -foreground { disabled "#565248" } \

        -background { disabled "#e3e1dd"
          pressed  "#bab5ab"
          active   "#c1d2ee" }
    
    # ::ttk::style layout TButton {
    #  Button.button -children { Button.focus -children { Button.label } }
    # }
    
    ::ttk::style configure TButton -padding {1 1} -width -11
    
    # Troughs

    # ttk::style layout Horizontal.TScrollbar:
    # Horizontal.Scrollbar.trough -sticky we -children {
    #   Horizontal.Scrollbar.leftarrow -side left -sticky {}
    #   Horizontal.Scrollbar.rightarrow -side right -sticky {}
    #   Horizontal.Scrollbar.thumb -expand 1 -sticky nswe
    # }

    # ::ttk::style element create trough image $I(horizontal_trough) \
    #    -border 3

    ::ttk::style element create Horizontal.Scrollbar.trough \
        image $I(horizontal_trough) -border 0 -sticky ew

    ::ttk::style element create Vertical.Scrollbar.trough \
        image $I(vertical_trough) -border 0

    ::ttk::style element create Vertical.Scale.trough \
        image $I(vertical_trough) -border 2
    ::ttk::style element create Progress.trough \
        image $I(vertical_trough) -border 2

    ## Panedwindow parts.
    #
    ::ttk::style element create hsash image \
            [list $I(hseparator-n) {active !disabled} $I(hseparator-a)] \
            -border {2 0}
    ::ttk::style element create vsash image \
            [list $I(vseparator-n) {active !disabled} $I(vseparator-a)] \
            -border {0 2}

    # Buttons, Checkbuttons and Radiobuttons
    
    ::ttk::style layout TButton {
      Button.background
      Button.button -children {
        Button.focus -children {
          Button.label
        }
      }
    }
    
    ::ttk::style element create Button.button image \

        [list $I(buttonNorm) pressed $I(buttonPressed) active $I(button)] \
        -border {4 4} -padding 3 -sticky nsew
    
    ::ttk::style element create Checkbutton.indicator image \
        [list $I(checkbox_unchecked) selected $I(checkbox_checked)] \
        -width 20 -sticky w
    ::ttk::style element create Radiobutton.indicator image \
        [list $I(option_out) selected $I(option_in)] \
        -width 20 -sticky w
    
    # Menubuttons:
    
    ::ttk::style element create Menubutton.button image \
        [list $I(menubar_option) ] \
        -border {7 10 29 15} -padding {7 4 29 4} -sticky news
    
    ::ttk::style element create Menubutton.indicator image \

        [list $I(menubar_option_arrow) disabled $I(menubar_option_arrow_insensitive)] \
        -width 11 -sticky w -padding {0 0 18 0}
    
    # Scrollbar

    ::ttk::style element create Horizontal.Scrollbar.thumb \
        image $I(scrollbar_horizontal) -border 7 -width 15 -height 0 -sticky nsew




    #::ttk::style element create Horizontal.Scrollbar.thumb \
    #    image [list $I(scrollbar_horizontal) \
	#       !selected $I(scrollbar_horizontal_inactive) \
	#       pressed  $I(scrollbar_horizontal)] -border 7 -width 15 -height 0 -sticky nsew



    ::ttk::style element create Vertical.Scrollbar.thumb \



        image $I(scrollbar_vertical) -border 7 -width 0 -height 15 -sticky nsew
    
    # Scale
    
    ::ttk::style element create Horizontal.Scale.slider \
        image $I(scrollbar_horizontal) \
        -border 3 -width 30 -height 16
    
................................................................................
    
    ::ttk::style element create Progress.bar image $I(progressbar)
    
    # Arrows
    
    ::ttk::style element create uparrow image \
        [list $I(arrow_up_normal) \
        pressed $I(arrow_up_active) \
        disabled $I(arrow_up_insensitive)]
    ::ttk::style element create downarrow image \
        [list $I(arrow_down_normal) \
        pressed $I(arrow_down_active) \
        disabled $I(arrow_down_insensitive)]
    ::ttk::style element create leftarrow image \
        [list $I(arrow_left_normal) \
        pressed $I(arrow_left_active) \
        disabled $I(arrow_left_insensitive)]
    ::ttk::style element create rightarrow image \
        [list $I(arrow_right_normal) \
        pressed $I(arrow_right_active) \
        disabled $I(arrow_right_insensitive)]
    
    # Notebook parts
    
    ::ttk::style element create tab image \
        [list $I(notebook) selected  $I(notebook_active)] \


        -sticky news \
        -border {10 2 10 2} -height 10
    
    ::ttk::style configure TNotebook.Tab -padding {2 2}
    ::ttk::style configure TNotebook -expandtab {2 2}
    
    






|







 







>
|
|
|
|
<
<
<
<
<
<


<
<
<
<
<
<
<
<
<
<
|
|

|


<
<

|

|
|
|
<
|
|
<
|













>
|









|






>
|




|
|

>
>
>
|
|
|
<
>
>


>
>
>
|







 







|
|


|
|


|
|


|
|




|
>
>







3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
..
71
72
73
74
75
76
77
78
79
80
81
82






83
84










85
86
87
88
89
90


91
92
93
94
95
96

97
98

99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145

146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
...
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
#   Copyright (C) 2004 Pat Thoyts <[email protected]>
#
#   Import the aquativo Gtk theme (C) Andrew Wyatt, FEWT Software
#   Original: http://www.fewt.com
#   Link: http://art.gnome.org/themes/gtk2/432.php
# ------------------------------------------------------------------------------
# Revision change history:
#   $Id: aquativo.tcl,v 1.4 2009/10/25 20:53:27 oberdorfer Exp $
#
#   Aug.'08: code refractured for the use with >= tk8.5,
#            [email protected]
# ------------------------------------------------------------------------------

package require Tk 8.4;                 # minimum version for Tile
package require tile 0.8;               # depends upon tile
................................................................................
        -font TkDefaultFont \
        -background "#fafafa" \
        -foreground "Black"
    
    # I really like the mapping options!
    ::ttk::style map "." \
        -foreground { disabled "#565248" } \
        -background { \
	    disabled "#e3e1dd"
            pressed  "#bab5ab"
            active   "#c1d2ee" }
        






    # Troughs











    ::ttk::style element create Horizontal.Scale.trough \
        image $I(horizontal_trough) -border 0

    ::ttk::style element create Vertical.Scale.trough \
        image $I(vertical_trough) -border 0



    ::ttk::style element create Progress.trough \
        image $I(vertical_trough) -border 0

    # Panedwindow parts

    ::ttk::style element create hsash \

            image $I(hseparator) -border {2 0}
    ::ttk::style element create vsash \

            image $I(vseparator) -border {0 2}

    # Buttons, Checkbuttons and Radiobuttons
    
    ::ttk::style layout TButton {
      Button.background
      Button.button -children {
        Button.focus -children {
          Button.label
        }
      }
    }
    
    ::ttk::style element create Button.button image \
        [list $I(buttonNorm) \
	      pressed $I(buttonPressed) active $I(buttonPressed)] \
        -border {4 4} -padding 3 -sticky nsew
    
    ::ttk::style element create Checkbutton.indicator image \
        [list $I(checkbox_unchecked) selected $I(checkbox_checked)] \
        -width 20 -sticky w
    ::ttk::style element create Radiobutton.indicator image \
        [list $I(option_out) selected $I(option_in)] \
        -width 20 -sticky w
    
    # Menubuttons
    
    ::ttk::style element create Menubutton.button image \
        [list $I(menubar_option) ] \
        -border {7 10 29 15} -padding {7 4 29 4} -sticky news
    
    ::ttk::style element create Menubutton.indicator image \
        [list $I(menubar_option_arrow) \
	      disabled $I(menubar_option_arrow_insensitive)] \
        -width 11 -sticky w -padding {0 0 18 0}
    
    # Scrollbar

    ::ttk::style element create Horizontal.Scrollbar.trough \
        image $I(horizontal_trough) -width 16 -border 0 -sticky ew

    ::ttk::style element create Vertical.Scrollbar.trough \
        image $I(vertical_trough) -height 16 -border 0 -sticky ns

    ::ttk::style element create Horizontal.Scrollbar.thumb \
        image [list $I(scrollbar_horizontal) \
	            {active !disabled} $I(scrollbar_horizontal) \

		    disabled  $I(horizontal_trough)] \
        -border 7 -width 16 -height 0 -sticky nsew

    ::ttk::style element create Vertical.Scrollbar.thumb \
        image [list $I(scrollbar_vertical) \
	            {active !disabled}  $I(scrollbar_vertical) \
		    disabled $I(vertical_trough)] \
 	-border 7 -width 0 -height 16 -sticky nsew
    
    # Scale
    
    ::ttk::style element create Horizontal.Scale.slider \
        image $I(scrollbar_horizontal) \
        -border 3 -width 30 -height 16
    
................................................................................
    
    ::ttk::style element create Progress.bar image $I(progressbar)
    
    # Arrows
    
    ::ttk::style element create uparrow image \
        [list $I(arrow_up_normal) \
              pressed $I(arrow_up_active) \
              disabled $I(arrow_up_insensitive)] -width 12
    ::ttk::style element create downarrow image \
        [list $I(arrow_down_normal) \
              pressed $I(arrow_down_active) \
              disabled $I(arrow_down_insensitive)] -width 12
    ::ttk::style element create leftarrow image \
        [list $I(arrow_left_normal) \
              pressed $I(arrow_left_active) \
              disabled $I(arrow_left_insensitive)] -height 12
    ::ttk::style element create rightarrow image \
        [list $I(arrow_right_normal) \
              pressed $I(arrow_right_active) \
              disabled $I(arrow_right_insensitive)] -height 12
    
    # Notebook parts
    
    ::ttk::style element create tab image \
        [list $I(notebook) selected $I(notebook_active) \
                           active   $I(notebook_inactive) \
                           disabled $I(notebook_inactive)] \
        -sticky news \
        -border {10 2 10 2} -height 10
    
    ::ttk::style configure TNotebook.Tab -padding {2 2}
    ::ttk::style configure TNotebook -expandtab {2 2}