Bwidget Source Code
Check-in [4f9f713d30]
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:Only support Tile 0.8 and newer + spacing in themed Font Toolbar. Ticket [d7ea07c40a]
Timelines: family | ancestors | descendants | both | bwidget
Files: files | file ages | folders
SHA1: 4f9f713d30f47821719e9fedfa7a1a004fcedfb9
User & Date: oehhar 2016-03-22 09:02:27
References
2016-03-22
09:05 Closed ticket [d7ea07c40a]: Only support Tile 0.8 and newer + spacing in themed Font Toolbar plus 7 other changes artifact: 33e42b9e3c user: oehhar
Context
2016-07-15
11:19
pckIndex.tcl: auto-load commands also from global namespace and not only from BWidget namespace. Ticket [c86207db01] check-in: b8dc4b393d user: oehhar tags: bwidget
2016-07-12
18:23
Canonicalize name of auto_loaded commands.

Top-level commands should not have leading ::, but all others rest should. See auto_qualify commentary in Tcl's init.tcl.

See bug [c86207db01fc9ce0]. check-in: e49079d49e user: adrianmedranocalvo tags: bug-c86207db01fc9ce0

2016-03-22
09:02
Only support Tile 0.8 and newer + spacing in themed Font Toolbar. Ticket [d7ea07c40a] check-in: 4f9f713d30 user: oehhar tags: bwidget
2016-03-15
08:53
"Mainframe configure" caused error in themed mode. Ticket [52273c0a4e] check-in: f83cfb9f5f user: oehhar tags: bwidget
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.






1
2
3
4
5
6
7




2016-03-15 Harald Oehlmann <[email protected]>
	mainframe.tcl: "Mainframe configure" caused error in themed
	mode. Ticket [52273c0a4e]

2016-03-08 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.10 tagged ****
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
2016-03-22 Harald Oehlmann <[email protected]>
	Only support themed packages Tile 0.8 or Ttk.
	Repair the button spacing in themed font toolbar.
	Ticket [d7ea07c40a]

2016-03-15 Harald Oehlmann <[email protected]>
	mainframe.tcl: "Mainframe configure" caused error in themed
	mode. Ticket [52273c0a4e]

2016-03-08 Harald Oehlmann <[email protected]>

	**** BWidget 1.9.10 tagged ****

Changes to font.tcl.

280
281
282
283
284
285
286

287
288
289
290
291
292
293
...
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
			 -takefocus 0 -exportselection 0 \
			 -width    4 \
			 -values   $_sizes \
			 -textvariable SelectFont::${path}(size) \
			 -state readonly]
	    bind $lbf <<ComboboxSelected>> [list SelectFont::_update $path]
	    bind $lbs <<ComboboxSelected>> [list SelectFont::_update $path]

	} else {
	    frame $path -background $bg
	    set lbf [ComboBox::create $path.font \
			 -highlightthickness 0 -takefocus 0 -background $bg \
			 -values   $_families($fams) \
			 -textvariable SelectFont::$path\(family\) \
			 -editable 0 \
................................................................................
			 -editable 0 \
			 -modifycmd [list SelectFont::_update $path]]
	}
	bind $path <Destroy> [list SelectFont::_destroy $path]
        pack $lbf -side left -anchor w
        pack $lbs -side left -anchor w -padx 4
        foreach st $_styles {
	    if {$::Widget::_theme} {
		ttk::checkbutton $path.$st -takefocus 0 \
		    -style BWSlim.Toolbutton \
		    -image [Bitmap::get $st] \
		    -variable SelectFont::${path}($st) \
		    -command [list SelectFont::_update $path]
	    } else {
		button $path.$st \






>







 







|







280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
...
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
			 -takefocus 0 -exportselection 0 \
			 -width    4 \
			 -values   $_sizes \
			 -textvariable SelectFont::${path}(size) \
			 -state readonly]
	    bind $lbf <<ComboboxSelected>> [list SelectFont::_update $path]
	    bind $lbs <<ComboboxSelected>> [list SelectFont::_update $path]
	    ttk::style configure BWSlim.Toolbutton -padding 0
	} else {
	    frame $path -background $bg
	    set lbf [ComboBox::create $path.font \
			 -highlightthickness 0 -takefocus 0 -background $bg \
			 -values   $_families($fams) \
			 -textvariable SelectFont::$path\(family\) \
			 -editable 0 \
................................................................................
			 -editable 0 \
			 -modifycmd [list SelectFont::_update $path]]
	}
	bind $path <Destroy> [list SelectFont::_destroy $path]
        pack $lbf -side left -anchor w
        pack $lbs -side left -anchor w -padx 4
        foreach st $_styles {
	    if {[Widget::theme]} {
		ttk::checkbutton $path.$st -takefocus 0 \
		    -style BWSlim.Toolbutton \
		    -image [Bitmap::get $st] \
		    -variable SelectFont::${path}($st) \
		    -command [list SelectFont::_update $path]
	    } else {
		button $path.$st \

Changes to widget.tcl.

1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
}

proc Widget::theme {{bool {}}} {
    # Private, *experimental* API that may change at any time - JH
    variable _theme
    if {[llength [info level 0]] == 2} {
	# set theme-ability
	if {[catch {package require Tk 8.5a6}]
	    && [catch {package require tile 0.6}]
	    && [catch {package require tile 1}]} {
	    return -code error "BWidget's theming requires tile 0.6+"
	} else {
	    catch {style default BWSlim.Toolbutton -padding 0}
	}
	set _theme [string is true -strict $bool]
    }
    return $_theme
}






|
|
<
|
<
<





1701
1702
1703
1704
1705
1706
1707
1708
1709

1710


1711
1712
1713
1714
1715
}

proc Widget::theme {{bool {}}} {
    # Private, *experimental* API that may change at any time - JH
    variable _theme
    if {[llength [info level 0]] == 2} {
	# set theme-ability
	if {[catch {package require Ttk}]
	    && [catch {package require tile 0.8}]} {

	    return -code error "BWidget's theming requires ttk/tile 0.8+"


	}
	set _theme [string is true -strict $bool]
    }
    return $_theme
}