summaryrefslogtreecommitdiff
path: root/lib/search.tcl
diff options
context:
space:
mode:
authorLibravatar Pat Thoyts <patthoyts@users.sourceforge.net>2010-01-26 00:05:31 +0000
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2010-01-27 17:13:52 -0800
commitc80d7be5e1e0d110ea77cd41f658aabe5bcad0d8 (patch)
treebae6c567a406ffb3ca363d2e5a6eb319ea8decaa /lib/search.tcl
parentgit-gui: Update German translation (12 new or changed strings). (diff)
downloadtgif-c80d7be5e1e0d110ea77cd41f658aabe5bcad0d8.tar.xz
git-gui: use themed tk widgets with Tk 8.5
This patch enables the use of themed Tk widgets with Tk 8.5 and above. These make a significant difference on Windows in making the application appear native. On Windows and MacOSX ttk defaults to the native look as much as possible. On X11 the user may select a theme using the TkTheme XRDB resource class by adding an line to the .Xresources file. The set of installed theme names is available using the Tk command 'ttk::themes'. The default on X11 is similar to the current un-themed style - a kind of thin bordered motif look. A new git config variable 'gui.usettk' may be set to disable this if the user prefers the classic Tk look. Using Tk 8.4 will also avoid the use of themed widgets as these are only available since 8.5. Some support is included for Tk 8.6 features (themed spinbox and native font chooser for MacOSX and Windows). Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/search.tcl')
-rw-r--r--lib/search.tcl11
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/search.tcl b/lib/search.tcl
index b371e9a30a..7fdbf87bcd 100644
--- a/lib/search.tcl
+++ b/lib/search.tcl
@@ -14,15 +14,16 @@ field smarktop
field smarkbot
constructor new {i_w i_text args} {
+ global use_ttk NS
set w $i_w
set ctext $i_text
- frame $w
- label $w.l -text [mc Find:]
+ ${NS}::frame $w
+ ${NS}::label $w.l -text [mc Find:]
entry $w.ent -textvariable ${__this}::searchstring -background lightgreen
- button $w.bn -text [mc Next] -command [cb find_next]
- button $w.bp -text [mc Prev] -command [cb find_prev]
- checkbutton $w.cs -text [mc Case-Sensitive] \
+ ${NS}::button $w.bn -text [mc Next] -command [cb find_next]
+ ${NS}::button $w.bp -text [mc Prev] -command [cb find_prev]
+ ${NS}::checkbutton $w.cs -text [mc Case-Sensitive] \
-variable ${__this}::casesensitive -command [cb _incrsearch]
pack $w.l -side left
pack $w.cs -side right