summaryrefslogtreecommitdiff
path: root/git-gui.sh
diff options
context:
space:
mode:
authorPhilipp A. Hartmann <ph@sorgh.de>2008-03-05 16:54:22 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2008-03-06 04:47:11 (GMT)
commitc382fdd79548a56fadf8f34d3484cf020eda3966 (patch)
treed0cd485c434726b230e496359add74f85ee9fdb5 /git-gui.sh
parent312fd92b069d26dce20f53e8fa4efea04b12e009 (diff)
downloadgit-c382fdd79548a56fadf8f34d3484cf020eda3966.zip
git-c382fdd79548a56fadf8f34d3484cf020eda3966.tar.gz
git-c382fdd79548a56fadf8f34d3484cf020eda3966.tar.bz2
git-gui: if a background colour is set, set foreground colour as well
In several places, only the background colour is set to an explicit value, sometimes even "white". This does not work well with dark colour themes. This patch tries to set the foreground colour to "black" in those situations, where an explicit background colour is set without defining any foreground colour. Signed-off-by: Philipp A. Hartmann <ph@sorgh.de> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'git-gui.sh')
-rwxr-xr-xgit-gui.sh19
1 files changed, 13 insertions, 6 deletions
diff --git a/git-gui.sh b/git-gui.sh
index 238a239..8741443 100755
--- a/git-gui.sh
+++ b/git-gui.sh
@@ -2289,8 +2289,9 @@ pack .vpane -anchor n -side top -fill both -expand 1
#
frame .vpane.files.index -height 100 -width 200
label .vpane.files.index.title -text [mc "Staged Changes (Will Commit)"] \
- -background lightgreen
-text $ui_index -background white -borderwidth 0 \
+ -background lightgreen -foreground black
+text $ui_index -background white -foreground black \
+ -borderwidth 0 \
-width 20 -height 10 \
-wrap none \
-cursor $cursor_ptr \
@@ -2308,8 +2309,9 @@ pack $ui_index -side left -fill both -expand 1
#
frame .vpane.files.workdir -height 100 -width 200
label .vpane.files.workdir.title -text [mc "Unstaged Changes"] \
- -background lightsalmon
-text $ui_workdir -background white -borderwidth 0 \
+ -background lightsalmon -foreground black
+text $ui_workdir -background white -foreground black \
+ -borderwidth 0 \
-width 20 -height 10 \
-wrap none \
-cursor $cursor_ptr \
@@ -2416,7 +2418,8 @@ pack $ui_coml -side left -fill x
pack .vpane.lower.commarea.buffer.header.amend -side right
pack .vpane.lower.commarea.buffer.header.new -side right
-text $ui_comm -background white -borderwidth 1 \
+text $ui_comm -background white -foreground black \
+ -borderwidth 1 \
-undo true \
-maxundo 20 \
-autoseparators true \
@@ -2493,15 +2496,18 @@ trace add variable current_diff_path write trace_current_diff_path
frame .vpane.lower.diff.header -background gold
label .vpane.lower.diff.header.status \
-background gold \
+ -foreground black \
-width $max_status_desc \
-anchor w \
-justify left
label .vpane.lower.diff.header.file \
-background gold \
+ -foreground black \
-anchor w \
-justify left
label .vpane.lower.diff.header.path \
-background gold \
+ -foreground black \
-anchor w \
-justify left
pack .vpane.lower.diff.header.status -side left
@@ -2525,7 +2531,8 @@ bind_button3 .vpane.lower.diff.header.path "tk_popup $ctxm %X %Y"
#
frame .vpane.lower.diff.body
set ui_diff .vpane.lower.diff.body.t
-text $ui_diff -background white -borderwidth 0 \
+text $ui_diff -background white -foreground black \
+ -borderwidth 0 \
-width 80 -height 15 -wrap none \
-font font_diff \
-xscrollcommand {.vpane.lower.diff.body.sbx set} \