# [PATCH] gitk: use user-configured background in view definition dialog

2 messages from 2007-12-28 to 2008-01-08. Participants: Gerrit Pape.
Thread: https://gitlist.dev/t/11413

## Gerrit Pape, 2007-12-28 14:51

Subject: [PATCH] gitk: use user-configured background in view definition dialog
Message-ID: <20071228145156.8106.qmail@6afea2d2003e0e.315fe32.mid.smarden.org>
URL: https://gitlist.dev/e/20071228145156.8106.qmail%406afea2d2003e0e.315fe32.mid.smarden.org

```
Have the text fields in the view definition dialog (View->New view...)
use the background color as configured through the preferences, instead
of hard-coded 'white'.

This was suggested by Paul Wise through
 http://bugs.debian.org/457124

Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 gitk |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gitk b/gitk
index 684e614..7d70c64 100755
--- a/gitk
+++ b/gitk
@@ -1881,7 +1881,7 @@ proc editview {} {
 
 proc vieweditor {top n title} {
     global newviewname newviewperm viewfiles
-    global uifont
+    global uifont bgcolor
 
     toplevel $top
     wm title $top $title
@@ -1895,12 +1895,12 @@ proc vieweditor {top n title} {
 	-text [mc "Commits to include (arguments to git rev-list):"]
     grid $top.al - -sticky w -pady 5
     entry $top.args -width 50 -textvariable newviewargs($n) \
-	-background white -font uifont
+	-background $bgcolor -font uifont
     grid $top.args - -sticky ew -padx 5
     message $top.l -aspect 1000 -font uifont \
 	-text [mc "Enter files and directories to include, one per line:"]
     grid $top.l - -sticky w
-    text $top.t -width 40 -height 10 -background white -font uifont
+    text $top.t -width 40 -height 10 -background $bgcolor -font uifont
     if {[info exists viewfiles($n)]} {
 	foreach f $viewfiles($n) {
 	    $top.t insert end $f
-- 
1.5.3.7

```

## Gerrit Pape, 2008-01-08 09:55

Subject: Re: [PATCH] gitk: use user-configured background in view definition dialog
Message-ID: <20080108095534.18927.qmail@ea6d20fb1070bc.315fe32.mid.smarden.org>
URL: https://gitlist.dev/e/20080108095534.18927.qmail%40ea6d20fb1070bc.315fe32.mid.smarden.org
In-Reply-To: <20071228145156.8106.qmail@6afea2d2003e0e.315fe32.mid.smarden.org>

```
Hi, I suggest to apply this change to gitk.  Thanks, Gerrit.


On Fri, Dec 28, 2007 at 02:51:56PM +0000, Gerrit Pape wrote:
> Have the text fields in the view definition dialog (View->New view...)
> use the background color as configured through the preferences, instead
> of hard-coded 'white'.
> 
> This was suggested by Paul Wise through
>  http://bugs.debian.org/457124
> 
> Signed-off-by: Gerrit Pape <pape@smarden.org>
> ---
>  gitk |    6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/gitk b/gitk
> index 684e614..7d70c64 100755
> --- a/gitk
> +++ b/gitk
> @@ -1881,7 +1881,7 @@ proc editview {} {
>  
>  proc vieweditor {top n title} {
>      global newviewname newviewperm viewfiles
> -    global uifont
> +    global uifont bgcolor
>  
>      toplevel $top
>      wm title $top $title
> @@ -1895,12 +1895,12 @@ proc vieweditor {top n title} {
>  	-text [mc "Commits to include (arguments to git rev-list):"]
>      grid $top.al - -sticky w -pady 5
>      entry $top.args -width 50 -textvariable newviewargs($n) \
> -	-background white -font uifont
> +	-background $bgcolor -font uifont
>      grid $top.args - -sticky ew -padx 5
>      message $top.l -aspect 1000 -font uifont \
>  	-text [mc "Enter files and directories to include, one per line:"]
>      grid $top.l - -sticky w
> -    text $top.t -width 40 -height 10 -background white -font uifont
> +    text $top.t -width 40 -height 10 -background $bgcolor -font uifont
>      if {[info exists viewfiles($n)]} {
>  	foreach f $viewfiles($n) {
>  	    $top.t insert end $f
> -- 
> 1.5.3.7
> 
> -
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

```
