summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLibravatar Philipp A. Hartmann <ph@sorgh.de>2008-03-05 17:54:22 +0100
committerLibravatar Shawn O. Pearce <spearce@spearce.org>2008-03-05 23:47:11 -0500
commitc382fdd79548a56fadf8f34d3484cf020eda3966 (patch)
treed0cd485c434726b230e496359add74f85ee9fdb5 /lib
parentgit-gui: translate the remaining messages in zh_cn.po to chinese (diff)
downloadtgif-c382fdd79548a56fadf8f34d3484cf020eda3966.tar.xz
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 'lib')
-rw-r--r--lib/blame.tcl25
-rw-r--r--lib/browser.tcl3
-rw-r--r--lib/choose_font.tcl2
-rw-r--r--lib/console.tcl10
-rw-r--r--lib/error.tcl4
5 files changed, 34 insertions, 10 deletions
diff --git a/lib/blame.tcl b/lib/blame.tcl
index 00ecf21333..92fac1bad4 100644
--- a/lib/blame.tcl
+++ b/lib/blame.tcl
@@ -80,6 +80,7 @@ constructor new {i_commit i_path} {
label $w.header.commit_l \
-text [mc "Commit:"] \
-background gold \
+ -foreground black \
-anchor w \
-justify left
set w_back $w.header.commit_b
@@ -89,6 +90,7 @@ constructor new {i_commit i_path} {
-relief flat \
-state disabled \
-background gold \
+ -foreground black \
-activebackground gold
bind $w_back <Button-1> "
if {\[$w_back cget -state\] eq {normal}} {
@@ -98,16 +100,19 @@ constructor new {i_commit i_path} {
label $w.header.commit \
-textvariable @commit \
-background gold \
+ -foreground black \
-anchor w \
-justify left
label $w.header.path_l \
-text [mc "File:"] \
-background gold \
+ -foreground black \
-anchor w \
-justify left
set w_path $w.header.path
label $w_path \
-background gold \
+ -foreground black \
-anchor w \
-justify left
pack $w.header.commit_l -side left
@@ -135,7 +140,9 @@ constructor new {i_commit i_path} {
-takefocus 0 \
-highlightthickness 0 \
-padx 0 -pady 0 \
- -background white -borderwidth 0 \
+ -background white \
+ -foreground black \
+ -borderwidth 0 \
-state disabled \
-wrap none \
-height 40 \
@@ -148,7 +155,9 @@ constructor new {i_commit i_path} {
-takefocus 0 \
-highlightthickness 0 \
-padx 0 -pady 0 \
- -background white -borderwidth 0 \
+ -background white \
+ -foreground black \
+ -borderwidth 0 \
-state disabled \
-wrap none \
-height 40 \
@@ -166,7 +175,9 @@ constructor new {i_commit i_path} {
-takefocus 0 \
-highlightthickness 0 \
-padx 0 -pady 0 \
- -background white -borderwidth 0 \
+ -background white \
+ -foreground black \
+ -borderwidth 0 \
-state disabled \
-wrap none \
-height 40 \
@@ -184,7 +195,9 @@ constructor new {i_commit i_path} {
-takefocus 0 \
-highlightthickness 0 \
-padx 0 -pady 0 \
- -background white -borderwidth 0 \
+ -background white \
+ -foreground black \
+ -borderwidth 0 \
-state disabled \
-wrap none \
-height 40 \
@@ -213,7 +226,9 @@ constructor new {i_commit i_path} {
set w_cviewer $w.file_pane.cm.t
text $w_cviewer \
- -background white -borderwidth 0 \
+ -background white \
+ -foreground black \
+ -borderwidth 0 \
-state disabled \
-wrap none \
-height 10 \
diff --git a/lib/browser.tcl b/lib/browser.tcl
index 53d5a62816..ab470d1264 100644
--- a/lib/browser.tcl
+++ b/lib/browser.tcl
@@ -39,7 +39,8 @@ constructor new {commit {path {}}} {
frame $w.list
set w_list $w.list.l
- text $w_list -background white -borderwidth 0 \
+ text $w_list -background white -foreground black \
+ -borderwidth 0 \
-cursor $cursor_ptr \
-state disabled \
-wrap none \
diff --git a/lib/choose_font.tcl b/lib/choose_font.tcl
index 0c4051b375..56443b042c 100644
--- a/lib/choose_font.tcl
+++ b/lib/choose_font.tcl
@@ -55,6 +55,7 @@ constructor pick {path title a_family a_size} {
set w_family $w.inner.family.v
text $w_family \
-background white \
+ -foreground black \
-borderwidth 1 \
-relief sunken \
-cursor $::cursor_ptr \
@@ -92,6 +93,7 @@ constructor pick {path title a_family a_size} {
set w_example $w.example.t
text $w_example \
-background white \
+ -foreground black \
-borderwidth 1 \
-relief sunken \
-height 3 \
diff --git a/lib/console.tcl b/lib/console.tcl
index 5597188d80..c112464ec3 100644
--- a/lib/console.tcl
+++ b/lib/console.tcl
@@ -46,7 +46,9 @@ method _init {} {
-justify left \
-font font_uibold
text $w_t \
- -background white -borderwidth 1 \
+ -background white \
+ -foreground black \
+ -borderwidth 1 \
-relief sunken \
-width 80 -height 10 \
-wrap none \
@@ -180,7 +182,8 @@ method done {ok} {
if {$ok} {
if {[winfo exists $w.m.s]} {
bind $w.m.s <Destroy> [list delete_this $this]
- $w.m.s conf -background green -text [mc "Success"]
+ $w.m.s conf -background green -foreground black \
+ -text [mc "Success"]
if {$is_toplevel} {
$w.ok conf -state normal
focus $w.ok
@@ -193,7 +196,8 @@ method done {ok} {
_init $this
}
bind $w.m.s <Destroy> [list delete_this $this]
- $w.m.s conf -background red -text [mc "Error: Command Failed"]
+ $w.m.s conf -background red -foreground black \
+ -text [mc "Error: Command Failed"]
if {$is_toplevel} {
$w.ok conf -state normal
focus $w.ok
diff --git a/lib/error.tcl b/lib/error.tcl
index 8c27678e3a..75650157e5 100644
--- a/lib/error.tcl
+++ b/lib/error.tcl
@@ -80,7 +80,9 @@ proc hook_failed_popup {hook msg {is_fatal 1}} {
-justify left \
-font font_uibold
text $w.m.t \
- -background white -borderwidth 1 \
+ -background white \
+ -foreground black \
+ -borderwidth 1 \
-relief sunken \
-width 80 -height 10 \
-font font_diff \