git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Issue with git-gui and font used for widgets

From
EWEric Work <work.eric@gmail.com>
Date
Dec 7, 2018, 06:10 UTC
Message-ID
<CAGqRQN8XmCJ=_qqPNxmt3B=KUWNs6Yx8Y0q7hLNWJrP6=4rgKw@mail.gmail.com>
Hi,

I have set my UI font in the git-gui preferences, but it only affects the menus and certain widgets. It does not apply the font to labels and buttons. This creates a problem for my HiDPI display because the fonts are quite small. I've never programmed in TCL/TK before so I don't know exactly what is wrong, but looking at the code I see where it's supposed to apply the font option to the widgets in a foreach loop.

foreach class {Button Checkbutton Entry Label
    Labelframe Listbox Message
    Radiobutton Spinbox Text} {
  option add *$class.font font_ui
}

But that doesn't seem to work. As an experiment I added the -font parameter (according to the docs) to where the branch label is created and that worked as expected.

${NS}::label .branch.l1 \
  -text [mc "Current Branch:"] \
  -anchor w \
  -justify left \
  -font font_ui

I don't know what is the expected behavior in terms of setting fonts, but I would assume that is not expected? It appears to be using TkDefaultFont instead. The default font being small is really a tk problem, where as setting the widget font is a git-gui problem. I created the following bug report against tk to get some feedback on the small default font issue as well as documented a workaround to allow per user default fonts.

https://core.tcl-lang.org/tk/tktview/dccd82bdc70dc25bb6709a6c14880a92104dda43
Any suggestions?
-Eric
Message 1 of 1 in “Issue with git-gui and font used for widgets”
  1. Eric WorkDec 7, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.