Re: [PATCH] git-gui: use themed tk widgets with Tk 8.5

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] git-gui: use themed tk widgets with Tk 8.5

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:55

Pat Thoyts [off-list ref] writes:
2009/12/20 Johannes Schindelin [off-list ref]:
quoted
quoted
 On Windows and MacOSX ttk defaults to the native look as much as possible.
 On X11 the user may select a theme using the TkTheme XRDB resource class.
Maybe you could describe a quick way to set that resource?
echo '*TkTheme: clam' | xrdb -merge -

Or edit ~/.Xdefaults or maybe ~/.Xresources to add a line containing
 *TkTheme: clam
Used to be the X resource database was the way to customize X11. The
builtin themes are:
default: thin borders, kind of windows98ish
classic: motif style
alt: more windowsy still.
clam: based on some version of the XFCE look a few years ago.
On X, does the "default: thin borders, kind of windows98ish" look very
different from the non-themed classic Tk style?

What I am trying to get at is to gain enough information so that I can
suggest a rewrite of these two lines (quoted at the beginning by Dscho)
like this:

   Ttk defaults to the native look as much as possible on Windows and
   MacOSX; the default on X is the _________ look.

   The user may choose a theme by:

   - on Windows, doing ________;
   - on MacOSX, doing _________;
   - on X, selecting a theme using the TkTheme XRDB resource class;

which I think would be much easier to read.

Re: [msysGit] [PATCH] git-gui: use themed tk widgets with Tk 8.5

From: Pat Thoyts <hidden>
Date: 2016-06-15 22:47:55

2009/12/20 Junio C Hamano [off-list ref]:
On X, does the "default: thin borders, kind of windows98ish" look very
different from the non-themed classic Tk style?
Here is a big set of screenshots then:

Unmodified or with Tk 8.4:
original windows: http://www.patthoyts.tk/screenshots/git-gui-old.png
original unix:        http://www.patthoyts.tk/screenshots/git-gui-x11.png

With Tk 8.5 and using themed widgets:
unix default: http://www.patthoyts.tk/screenshots/git-gui-default.png
unix alt:        http://www.patthoyts.tk/screenshots/git-gui-alt.png
unix classic: http://www.patthoyts.tk/screenshots/git-gui-classic.png
unix clam:     http://www.patthoyts.tk/screenshots/git-gui-clam.png
unix tileqt:    http://www.patthoyts.tk/screenshots/git-gui-tileqt.png
 (experimental)

windows7:     http://www.patthoyts.tk/screenshots/git-gui-win32.png

What I am trying to get at is to gain enough information so that I can
suggest a rewrite of these two lines (quoted at the beginning by Dscho)
like this:

  Ttk defaults to the native look as much as possible on Windows and
  MacOSX; the default on X is the _________ look.

  The user may choose a theme by:

  - on Windows, doing ________;
  - on MacOSX, doing _________;
  - on X, selecting a theme using the TkTheme XRDB resource class;

which I think would be much easier to read.
You write better than I do. The theme used globally by themed Tk can
be selected on at least Ubuntu's GNOME desktop by adding the following
line into ~/.Xresources:
  *TkTheme: clam
It is also possible to add a Theme menu or selection combobox onto the
options dialog and record a theme selection along with the other
git-gui saved options. Then a user could use 'git config gui.theme
clam'. The set of available themes can be extended with packages and
is somewhat platform dependent (ie: xpnative can only be present on
Windows XP and above).

Pat Thoyts.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help