summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortreectrl <treectrl>2006-12-04 00:16:02 (GMT)
committertreectrl <treectrl>2006-12-04 00:16:02 (GMT)
commit1d08e81bd774dd0e8da492a770bb06d2f5fd24a6 (patch)
tree84600fef0ec34d142a865846b564c435e0c03c68
parent2eb2cf4ae5672ac05a6aef93fb16b209352cc7ee (diff)
downloadtktreectrl-1d08e81bd774dd0e8da492a770bb06d2f5fd24a6.zip
tktreectrl-1d08e81bd774dd0e8da492a770bb06d2f5fd24a6.tar.gz
tktreectrl-1d08e81bd774dd0e8da492a770bb06d2f5fd24a6.tar.bz2
Use named fonts DemoFontBold and DemoFontUnderline.
-rw-r--r--demos/biglist.tcl4
-rw-r--r--demos/firefox.tcl4
-rw-r--r--demos/help.tcl4
-rw-r--r--demos/mycomputer.tcl13
-rw-r--r--demos/outlook-folders.tcl4
-rw-r--r--demos/outlook-newgroup.tcl6
-rw-r--r--demos/style-editor.tcl4
7 files changed, 23 insertions, 16 deletions
diff --git a/demos/biglist.tcl b/demos/biglist.tcl
index f37e179..8bc5a37 100644
--- a/demos/biglist.tcl
+++ b/demos/biglist.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: biglist.tcl,v 1.12 2006/11/30 02:41:38 treectrl Exp $
+# RCS: @(#) $Id: biglist.tcl,v 1.13 2006/12/04 00:16:02 treectrl Exp $
set ::clip 1
proc DemoBigList {} {
@@ -52,7 +52,7 @@ if {$::clip} {
$T element create elemBorderTitle border -relief {sunken open raised {}} -thickness 1 \
-filled yes -background $::SystemButtonFace
$T element create elemTxtTitle text \
- -font [list "[$T cget -font] bold"]
+ -font [list DemoFontBold]
# Citizen
$T element create elemRectSel rect -showfocus no \
diff --git a/demos/firefox.tcl b/demos/firefox.tcl
index db654e9..e23783d 100644
--- a/demos/firefox.tcl
+++ b/demos/firefox.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: firefox.tcl,v 1.18 2006/11/30 02:41:38 treectrl Exp $
+# RCS: @(#) $Id: firefox.tcl,v 1.19 2006/12/04 00:16:02 treectrl Exp $
proc DemoFirefoxPrivacy {} {
@@ -65,7 +65,7 @@ if {$::clip} {
$T element create eWindow window
if {$::clip} { $T element configure eWindow -clip yes }
- $T element create eText1 text -font [list "[$T cget -font] bold"]
+ $T element create eText1 text -font [list DemoFontBold]
$T element create eRectTop rect -outline black -fill #FFFFCC \
-draw {yes open no {}} -outlinewidth 1 -open s
$T element create eRectBottom rect -outline black -fill #FFFFCC \
diff --git a/demos/help.tcl b/demos/help.tcl
index a4d9172..033fcfc 100644
--- a/demos/help.tcl
+++ b/demos/help.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: help.tcl,v 1.21 2006/11/30 02:41:38 treectrl Exp $
+# RCS: @(#) $Id: help.tcl,v 1.22 2006/12/04 00:16:02 treectrl Exp $
#
# Demo: Help contents
@@ -41,7 +41,7 @@ proc DemoHelpContents {} {
$T element create elemImgPage image -image help-page
$T element create elemImgBook image -image {help-book-open {open} help-book-closed {}}
$T element create elemTxt text -fill [list $::SystemHighlightText {selected focus} blue {mouseover}] \
- -font [list "[$T cget -font] underline" {mouseover}]
+ -font [list DemoFontUnderline {mouseover}]
$T element create elemRectSel rect -fill [list $::SystemHighlight {selected focus}] -showfocus yes
#
diff --git a/demos/mycomputer.tcl b/demos/mycomputer.tcl
index ad58385..f67e532 100644
--- a/demos/mycomputer.tcl
+++ b/demos/mycomputer.tcl
@@ -1,16 +1,23 @@
-# RCS: @(#) $Id: mycomputer.tcl,v 1.5 2006/11/23 22:24:56 treectrl Exp $
+# RCS: @(#) $Id: mycomputer.tcl,v 1.6 2006/12/04 00:16:02 treectrl Exp $
proc DemoMyComputer {} {
set T [DemoList]
+ set font [.menubar cget -font]
+ if {[lsearch -exact [font names] DemoMyComputerHeaderFont] == -1} {
+ array set fontInfo [font actual $font]
+ set fontInfo(-weight) bold
+ eval font create DemoMyComputerHeaderFont [array get fontInfo]
+ }
+
#
# Configure the treectrl widget
#
$T configure -showroot no -showbuttons no -showlines no \
-selectmode browse -xscrollincrement 20 \
- -font [.menubar cget -font]
+ -font $font
#
# Create columns
@@ -27,7 +34,7 @@ proc DemoMyComputer {} {
# Create elements
#
- $T element create txtHeader text -font [list "[$T cget -font] bold"]
+ $T element create txtHeader text -font [list DemoMyComputerHeaderFont]
$T element create txtName text -fill [list $::SystemHighlightText {selected focus}] \
-lines 1
$T element create txtOther text -lines 1
diff --git a/demos/outlook-folders.tcl b/demos/outlook-folders.tcl
index 565ec3f..368d181 100644
--- a/demos/outlook-folders.tcl
+++ b/demos/outlook-folders.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: outlook-folders.tcl,v 1.13 2006/11/30 02:41:38 treectrl Exp $
+# RCS: @(#) $Id: outlook-folders.tcl,v 1.14 2006/12/04 00:16:02 treectrl Exp $
#
# Demo: Outlook Express folder list
@@ -36,7 +36,7 @@ proc DemoOutlookFolders {} {
$T element create elemTxtRead text -fill [list $::SystemHighlightText {selected focus}] \
-lines 1
$T element create elemTxtUnread text -fill [list $::SystemHighlightText {selected focus}] \
- -font [list "[$T cget -font] bold"] -lines 1
+ -font [list DemoFontBold] -lines 1
$T element create elemTxtCount text -fill blue
$T element create elemImgFolder image -image outlook-folder
$T element create elemRectSel rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] \
diff --git a/demos/outlook-newgroup.tcl b/demos/outlook-newgroup.tcl
index 8341cf1..397e693 100644
--- a/demos/outlook-newgroup.tcl
+++ b/demos/outlook-newgroup.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: outlook-newgroup.tcl,v 1.19 2006/11/30 02:41:39 treectrl Exp $
+# RCS: @(#) $Id: outlook-newgroup.tcl,v 1.20 2006/12/04 00:16:02 treectrl Exp $
#
# Demo: Outlook Express newsgroup messages
@@ -59,7 +59,7 @@ proc DemoOutlookNewsgroup {} {
outlook-unread {}
}
$T element create elemTxt text -fill [list $::SystemHighlightText {selected focus}] \
- -font [list "[$T cget -font] bold" {read unread !open} "[$T cget -font] bold" {!read}] -lines 1
+ -font [list DemoFontBold {read unread !open} DemoFontBold {!read}] -lines 1
$T element create sel.e rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open e -showfocus yes
$T element create sel.w rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open w -showfocus yes
$T element create sel.we rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open we -showfocus yes
@@ -249,7 +249,7 @@ proc DemoOutlookNewsgroup_2 {} {
$T element create text.read text -fill [list $::SystemHighlightText {selected focus}] \
-lines 1
$T element create text.unread text -fill [list $::SystemHighlightText {selected focus}] \
- -font [list "[$T cget -font] bold"] -lines 1
+ -font [list DemoFontBold] -lines 1
$T element create sel.e rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open e -showfocus yes
$T element create sel.w rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open w -showfocus yes
$T element create sel.we rect -fill [list $::SystemHighlight {selected focus} gray {selected !focus}] -open we -showfocus yes
diff --git a/demos/style-editor.tcl b/demos/style-editor.tcl
index 2bbd589..7c71781 100644
--- a/demos/style-editor.tcl
+++ b/demos/style-editor.tcl
@@ -1,4 +1,4 @@
-# RCS: @(#) $Id: style-editor.tcl,v 1.13 2006/11/19 00:55:51 treectrl Exp $
+# RCS: @(#) $Id: style-editor.tcl,v 1.14 2006/12/04 00:16:02 treectrl Exp $
namespace eval StyleEditor {
variable Info
@@ -255,7 +255,7 @@ proc StyleEditor::SetPropertyList {} {
$T element create e1 text \
-fill [list $::SystemHighlightText selected white header] \
- -font [list "[$T cget -font] bold" header]
+ -font [list DemoFontBold header]
$T element create e2 rect \
-fill [list #ACA899 header $::SystemHighlight selected] \
-outline black -outlinewidth 1 -open nw -showfocus no