summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 058803f)
raw | patch | inline | side by side (parent: 058803f)
author | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 02:02:37 +0000 (21:02 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Sun, 12 Nov 2006 05:16:04 +0000 (00:16 -0500) |
Rather than hardcoding our fonts to something that I thought was
reasonable, guess font_ui off the font used by the system in the
menu bar. This way the application conforms by default to whatever
the user's desktop is setup to.
We also now let the user supply font configuration through their
repository configuration as gui.fontui (the overall UI font) and
gui.fontdiff (the font used for the diff viewer).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
reasonable, guess font_ui off the font used by the system in the
menu bar. This way the application conforms by default to whatever
the user's desktop is setup to.
We also now let the user supply font configuration through their
repository configuration as gui.fontui (the overall UI font) and
gui.fontdiff (the font used for the diff viewer).
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
git-gui | patch | blob | history |
index 008eeb44607cfb96aacc0823214c912ea74324d7..26df169c1877d7779343fcf467b84acca110cb46 100755 (executable)
--- a/git-gui
+++ b/git-gui
##
## ui init
-set font_ui {Helvetica 10}
-set font_diff {Courier 10}
-set cursor_ptr left_ptr
+set font_ui {}
+set font_diff {}
+set cursor_ptr {}
+menu .mbar -tearoff 0
+catch {set font_ui [lindex $repo_config(gui.fontui) 0]}
+catch {set font_diff [lindex $repo_config(gui.fontdiff) 0]}
+if {$font_ui == {}} {catch {set font_ui [.mbar cget -font]}}
+if {$font_ui == {}} {set font_ui {Helvetica 10}}
+if {$font_diff == {}} {set font_diff {Courier 10}}
+if {$cursor_ptr == {}} {set cursor_ptr left_ptr}
switch -glob -- "$tcl_platform(platform),$tcl_platform(os)" {
windows,* {set M1B Control; set M1T Ctrl}
}
# -- Menu Bar
-menu .mbar -tearoff 0
.mbar add cascade -label Project -menu .mbar.project
.mbar add cascade -label Edit -menu .mbar.edit
.mbar add cascade -label Commit -menu .mbar.commit