This is the mail archive of the
insight@sources.redhat.com
mailing list for the Insight project.
[PATCH] Add some common font attributes to prefs.tcl
- To: Insight Maling List <insight at sources dot redhat dot com>
- Subject: [PATCH] Add some common font attributes to prefs.tcl
- From: Keith Seitz <keiths at cygnus dot com>
- Date: Thu, 9 Aug 2001 13:45:28 -0700 (PDT)
Hi,
I've committed the following patch which adds some common font attributes
to prefs.tcl. I'm not 100% on these, but it's a place to start thinking.
These will be needed for my pending register window "rewrite".
Keith
ChangeLog
2001-08-09 Keith Seitz <keiths@redhat.com>
* library/prefs.tcl (pref_set_defaults): Add new font
color defaults for highlighting, headers, selecting, and "normal".
Get rid of gdb/variable/highlight_fg and gdb/reg/highlight_fg.
* library/variables.tcl (build_win): Use gdb/font/highlight_fg
and gdb/font/highilght_bg to set highlight style.
* library/memwin.itb (build_win): Use header_fg and header_bg.
Patch
Index: gdbtk/library/prefs.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/prefs.tcl,v
retrieving revision 1.10
diff -u -p -r1.10 prefs.tcl
--- prefs.tcl 2001/07/26 16:11:17 1.10
+++ prefs.tcl 2001/08/09 20:41:25
@@ -269,6 +269,26 @@ proc pref_set_defaults {} {
pref define gdb/use_icons 1; # For Unix, use gdbtk_icon.gif as an icon
# some window managers can't deal with it.
+ #
+ # Font attributes
+ #
+
+ # "Normal" font attributes
+ pref define gdb/font/normal_fg black
+ pref define gdb/font/normal_bg gray92
+
+ # Selection foreground/background
+ pref define gdb/font/select_fg black
+ pref define gdb/font/select_bg lightgray
+
+ # Highlight used when something changes (variable value changes, etc)
+ pref define gdb/font/highlight_fg blue
+ pref define gdb/font/highlight_bg gray92
+
+ # "Header" foreground and background. Used by table headers and such.
+ pref define gdb/font/header_fg gray92
+ pref define gdb/font/header_bg darkgray
+
# set download and execution options
pref define gdb/load/verbose 0
pref define gdb/load/main 1
@@ -336,14 +356,12 @@ proc pref_set_defaults {} {
# Variable Window defaults
pref define gdb/variable/font src-font
- pref define gdb/variable/highlight_fg blue
pref define gdb/variable/disabled_fg gray
# Stack Window
pref define gdb/stack/font src-font
# Register Window
- pref define gdb/reg/highlight_fg blue
pref define gdb/reg/rows 16
# Global Prefs Dialogs
Index: gdbtk/library/memwin.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/memwin.itb,v
retrieving revision 1.9
diff -u -p -r1.9 memwin.itb
--- memwin.itb 2001/07/20 23:26:00 1.9
+++ memwin.itb 2001/08/09 20:41:38
@@ -118,6 +118,8 @@ body MemWin::build_win {} {
scrollbar $itk_interior.sx -command [list $itk_interior.t xview] -orient horizontal
$itk_interior.t tag config sel -bg [$itk_interior.t cget -bg] -relief sunken
$itk_interior.t tag config active -bg lightgray -relief sunken -wrap 0
+ $itk_interior.t tag config title -bg [pref get gdb/font/header_bg] \
+ -fg [pref get gdb/font/header_fg]
# rebind all events that use tkTableMoveCell to our local version
# because we don't want to move into the ASCII column if it exists
Index: gdbtk/library/variables.tcl
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/variables.tcl,v
retrieving revision 1.13
diff -u -p -r1.13 variables.tcl
--- variables.tcl 2001/07/21 18:43:34 1.13
+++ variables.tcl 2001/08/09 20:41:46
@@ -91,7 +91,7 @@ class VariableWin {
# Get display styles
set normal_fg [$Hlist cget -fg]
- set highlight_fg [pref get gdb/variable/highlight_fg]
+ set highlight_fg [pref get gdb/font/highlight_fg]
set disabled_fg [pref get gdb/variable/disabled_fg]
set NormalTextStyle [tixDisplayStyle text -refwindow $Hlist \
-bg $bg -fg $normal_fg -font src-font]