{"thread":{"id":"21251","subject":"[PATCH] gitk: Add configuration for UI colour scheme (menus, scrollbars, etc)","startedAt":"2009-10-15T16:51:49Z","lastAt":"2009-11-03T11:32:57Z","messageCount":2,"participants":["Guillermo S. Romero","Paul Mackerras"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"125086","messageId":"20091015165149.GA28219@crossbow.battleship","threadId":"21251","inReplyTo":null,"subject":"[PATCH] gitk: Add configuration for UI colour scheme (menus, scrollbars, etc)","fromName":"Guillermo S. Romero","fromEmail":"gsromero@infernal-iceberg.com","sentAt":"2009-10-15T16:51:49Z","receivedAt":"2009-10-15T16:51:49Z","isPatch":true,"sender":{"key":"gsromero@infernal-iceberg.com","avatar":null},"body":"Add option to control global colour scheme in Edit > Preferences dialog\nso the whole interface can have other color beyond the default one\nand match changes to other areas controlled by bgcolor and fgcolor.\n\nSigned-off-by: Guillermo S. Romero <gsromero@infernal-iceberg.com>\n---\n\nHi:\n\nSmall cosmetic patch. I found all colours were easily configurable\nfrom prefs, except the main colour, which can look a bit out of place\nwith the rest. No big changes, Tk computes all needed colours for\nbutton shading, fonts, etc. I hope the patch is correct, first time\nwith git.\n\nThanks for the app, pretty useful.\n\nGSR\n \nPS: Not subscribed to git@vger, so remember to CC: me.\n \n\n gitk-git/gitk |   16 ++++++++++++++--\n 1 files changed, 14 insertions(+), 2 deletions(-)\n\ndiff --git a/gitk-git/gitk b/gitk-git/gitk\nindex a0214b7..d40a735 100644\n--- a/gitk-git/gitk\n+++ b/gitk-git/gitk\n@@ -2519,7 +2519,7 @@ proc savestuff {w} {\n     global maxwidth showneartags showlocalchanges\n     global viewname viewfiles viewargs viewargscmd viewperm nextviewnum\n     global cmitmode wrapcomment datetimeformat limitdiffs\n-    global colors bgcolor fgcolor diffcolors diffcontext selectbgcolor\n+    global colors uicolor bgcolor fgcolor diffcolors diffcontext selectbgcolor\n     global autoselect extdifftool perfile_attrs markbgcolor\n     global hideremotes\n \n@@ -2546,6 +2546,7 @@ proc savestuff {w} {\n \tputs $f [list set showlocalchanges $showlocalchanges]\n \tputs $f [list set datetimeformat $datetimeformat]\n \tputs $f [list set limitdiffs $limitdiffs]\n+\tputs $f [list set uicolor $uicolor]\n \tputs $f [list set bgcolor $bgcolor]\n \tputs $f [list set fgcolor $fgcolor]\n \tputs $f [list set colors $colors]\n@@ -10425,7 +10426,7 @@ proc chg_fontparam {v sub op} {\n proc doprefs {} {\n     global maxwidth maxgraphpct\n     global oldprefs prefstop showneartags showlocalchanges\n-    global bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n+    global uicolor bgcolor fgcolor ctext diffcolors selectbgcolor markbgcolor\n     global tabstop limitdiffs autoselect extdifftool perfile_attrs\n     global hideremotes\n \n@@ -10489,6 +10490,10 @@ proc doprefs {} {\n \n     label $top.cdisp -text [mc \"Colors: press to choose\"]\n     grid $top.cdisp - -sticky w -pady 10\n+    label $top.ui -padx 40 -relief sunk -background $uicolor\n+    button $top.uibut -text [mc \"Interface\"] -font optionfont \\\n+       -command [list choosecolor uicolor {} $top.ui [mc \"interface\"] setui]\n+    grid x $top.uibut $top.ui -sticky w\n     label $top.bg -padx 40 -relief sunk -background $bgcolor\n     button $top.bgbut -text [mc \"Background\"] -font optionfont \\\n \t-command [list choosecolor bgcolor {} $top.bg [mc \"background\"] setbg]\n@@ -10572,6 +10577,10 @@ proc setselbg {c} {\n     allcanvs itemconf secsel -fill $c\n }\n \n+proc setui {c} {\n+    tk_setPalette $c\n+}\n+\n proc setbg {c} {\n     global bglist\n \n@@ -11079,6 +11088,7 @@ if {[tk windowingsystem] eq \"aqua\"} {\n }\n \n set colors {green red blue magenta darkgrey brown orange}\n+set uicolor grey85\n set bgcolor white\n set fgcolor black\n set diffcolors {red \"#00a000\" blue}\n@@ -11130,6 +11140,8 @@ eval font create textfontbold [fontflags textfont 1]\n parsefont uifont $uifont\n eval font create uifont [fontflags uifont]\n \n+tk_setPalette $uicolor\n+\n setoptions\n \n # check that we can find a .git directory somewhere...\n-- \n1.6.4.3\n"},{"id":"126647","messageId":"19184.5353.408377.248238@cargo.ozlabs.ibm.com","threadId":"21251","inReplyTo":"20091015165149.GA28219@crossbow.battleship","subject":"Re: [PATCH] gitk: Add configuration for UI colour scheme (menus, scrollbars, etc)","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2009-11-03T11:32:57Z","receivedAt":"2009-11-03T11:32:57Z","isPatch":true,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Guillermo S. Romero writes:\n\n> Add option to control global colour scheme in Edit > Preferences dialog\n> so the whole interface can have other color beyond the default one\n> and match changes to other areas controlled by bgcolor and fgcolor.\n> \n> Signed-off-by: Guillermo S. Romero <gsromero@infernal-iceberg.com>\n\nThanks, applied.\n\nPaul.\n"}]}