1
############################################################################
3
# LIBRARY: options.tcl gui options
4
# AUTHOR(S): Cedric Shock (cedricgrass AT shockfamily.net)
5
# PURPOSE: Default options and load user options
6
# COPYRIGHT: (C) 2006 GRASS Development Team
8
# This program is free software under the GNU General Public
9
# License (>=v2). Read the file COPYING that comes with GRASS
12
############################################################################
14
lappend auto_path $env(GISBASE)/bwidget
15
package require -exact BWidget 1.2.1
17
# set background color and help font
18
# These globals are still used in a few places by things in gis.m
21
##############################################################################
24
proc fontcreate {font args} {
25
if {[lsearch [font names] $font] == -1} {
26
eval font create $font $args
28
eval font configure $font $args
32
fontcreate balloon-help -family Helvetica -size -12
33
fontcreate default -family Helvetica -size -12
34
fontcreate textfont -family Courier -size -12
35
fontcreate bolddefault -family Helvetica -size 12 -weight bold
36
fontcreate introfont -family Helvetica -size 14 -weight bold
43
##############################################################################
44
# Configure balloon help:
46
DynamicHelp::configure -font balloon-help -fg black -bg "#FFFF77"
48
##############################################################################
49
# Configure almost everything using the options database
51
# Font to use everywhere
52
option add *font default
53
# Font in labelframes of labels in bwidgets is prefixed with label:
54
option add *labelfont default
56
# Various background colors
57
option add *background #dddddd
58
option add *activeBackground #dddddd
59
option add *highlightBackground #dddddd
60
option add *ButtonBox.background HoneyDew2
61
option add *ButtonBox*add.highlightBackground HoneyDew2
62
option add *MainFrame.background HoneyDew2
63
option add *PanedWindow.background HoneyDew2
64
option add *Menu.background HoneyDew2
65
option add *listbox.background white
66
option add *addindicator.background white
68
# Things that are selected:
69
option add *selectBackground #ffff9b
70
option add *selectForeground black
72
# Menus use active instead of selected
73
option add *Menu.activeBackground #ffff9b
74
option add *Menu.activeForeground black
76
# Scrollbar trough color
77
option add *troughColor HoneyDew3
79
# Entry widgets and text widgets should have a white background
80
option add *Entry.background white
81
option add *entry.background white
82
option add *Entry.highlightbackground #dddddd
83
option add *entrybg white
84
option add *Text.background white
85
option add *Entry.font textfont
86
option add *Text.font textfont
88
# Options for map canvases
89
option add *mapcanvas.background #eeeeee
90
option add *mapcanvas.insertbackground black
91
option add *mapcanvas.selectbackground #c4c4c4
92
option add *mapcanvas.selectforeground black
95
##############################################################################
96
# Platform specific default settings:
97
# keycontrol is control key used in copy-paste bindings
99
set keycontrol "Control"
101
if {[info exists env(osxaqua)]} {
102
set osxaqua $env(osxaqua)
107
if { $osxaqua == "1"} {
108
set keycontrol "Command"
111
if {[info exists env(OS)] && $env(OS) == "Windows_NT"} {