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

Reply via email to