aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: c5fabb41897c0c8be9d88d47d34bf4cca97fddee (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# gtk3-classic-module

This project provides a GTK module for GTK+ 3.24 to restore some of the
traditional look-and-feel of older GTK versions to GTK 3.  It is similar in
spirit to [gtk3-classic](https://github.com/lah7/gtk3-classic/), and in fact
much of the code in this module was inspired by the code from `gtk3-classic`;
however, this module does not require recompiling of GTK from source code.
You only need the development files for GTK; once this module is compiled, it
can be installed without replacing GTK entirely.

## Installation Instructions

You will need the Meson build system and the development files for GTK 3.
On Debian, Ubuntu, and their derivatives, type the following command to install
the build dependencies:

```
sudo apt install meson libgtk-3-dev
```

Download the source code for this module; `cd` into the directory into which
you downloaded it.  Then create a build directory and `cd` into that:

```
mkdir .build
cd .build
```

By default, it is assumed that GTK was installed into a prefix of `/usr`.  If
this is the case (it usually is), then you shouldn't need to supply any build
options:

```
meson setup ..
```

If GTK was installed into a diffeerent prefix -- for instance `/usr/local` --
add the `-Dprefix=[GTK-PREFIX]` option to the above `meson setup` command,
like so:

```
meson setup -Dprefix=/usr/local ..
```

Once the module is configured, build it and then install it:

```
meson compile
sudo meson install
```

You will need to restart all of your GTK applications before the module will
take effect.  If it doesn't then take effect, try running applications with the
environment variable `GTK_MODULES='gtk3-classic-module'` set.

Once installed, please check out your `/etc/gtk-3.0/settings.ini` file.  It
contains numerous useful settings which can be changed, complete with a large
amount of documentation about each option.

## What Does This Module Do?

* Applies stock icons to buttons and menu items which have standard text labels
  (example: 'Open...', 'Save As', 'Unlock').

  <img src='screenshots/button-icons.png'/>

  <img src='screenshots/menu-icons.png'/>

  **Requires setting the GTK settings `gtk-button-icons` and/or
  `gtk-menu-icons`.**

* Always displays underlines beneath mnemonics, even when the <kbd>Alt</kbd>
  key is not being held down.  Normally, the mnemonics are displayed only when
  <kbd>Alt</kbd> is held down or when a menu is open and active.

  <img src='screenshots/persistent-mnemonics.png'/>

  **Requires disabling the GTK setting `gtk-auto-mnemonics`.**

* Displays tree views with alternating row colours ('zebra stripes') if the
  tree view contains more than one column.

  <img src='screenshots/zebra-stripes.png'/>

  **Requires copying the contents of the file `data/zebra-stripes.css` into
  your `~/.config/gtk-3.0/gtk.css` file; please see the file
  `data/zebra-stripes.css` for more information, as there is a comment at the
  top of that file with more things you may need to know.**

* Forces GTK to display normal dialog buttons at the bottom of stock dialogs
  (e.g. About dialog, color chooser, file chooser), instead of displaying the
  buttons in a headerbar at the top of the dialog -- even on Wayland.

  <img src='screenshots/dialog-with-classic-buttons.png'/>

* One of the settings in the installed `/etc/gtk-3.0/settings.ini` file,
  default disables overlay scrolling:  Scrollbars will always be displayed,
  instead of only appearing when you are about to use them.

  **Change the `gtk-overlay-scrolling` GTK setting to affect this behaviour.**

* Stock icon sizes are once again modifiable.  Now you can have buttons with
  24x24 icons instead of the tiny 16x16 icons that GTK 3 usually uses.

  **See the GTK setting `gtk-icon-sizes` for more information.**

* Text entry widgets do not display the 'Insert Emoji' item in the context
  menu.

  **Re-enable the menu item by setting the environment variable
  `GTKM_INSERT_EMOJI=1`.**

* Various dialogs have their old appearances restored, not the least of which
  is message dialogs:  They once again have an image next to the dialog text
  (if it's appropriate to include an image), the text is left- (or right-)
  justified instead of being centered, and dialog buttons don't appear all
  grouped together into one lump:

  <img src='screenshots/message-dialog.png'/>

* The file chooser has the 'typeahead find' feature re-enabled, as opposed to
  the recursive search that GTK 3 normally performs.  Press
  <kbd>Alt</kbd>-<kbd>S</kbd> to launch the recursive search instead.

  <img src='screenshots/file-chooser-typeahead.png'/>

* The sizes of some widgets (mostly buttons) in the built-in GTK themes
  Adwaita and HighContrast have been reduced.

There may be other changes I have applied which I have forgotten to document
here.

## To-Do

* When the user scrolls over the tab bar of a GtkNotebook, switch the current
  tab.

  My experience with the patch from `gtk3-classic` is that some applications
  (e.g. [Pluma](https://github.com/mate-desktop/pluma) implement this scrolling
  behaviour themselves, and thus with the `gtk3-classic` patch applied,
  scrolling will move over by *two* tab positions at a time.  My implementation
  will record the current tab before passing control over to the default
  handler of scroll events; only if the current tab hasn't changed after the
  default handler runs, will the plugin switch tabs.

* At least convert headerbars from a virtual titlebar for the window into a
  box at the top of the window content area.

* Maybe use simple heuristics to eliminate the headerbar entirely if it's only
  used as a deliberate forced-client-side-titlebar.

* Convert menu-like popovers into traditional menus.

## License

GNU LGPL-2.  This is the same license under which GTK 3 is released.
bgstack15