Skip to content

Commit

Permalink
Some minor clean-ups and fixes before releasing 1.2.1 (long delayed)
Browse files Browse the repository at this point in the history
  • Loading branch information
thesquash committed Aug 10, 2022
1 parent 70e56cd commit c54c134
Show file tree
Hide file tree
Showing 17 changed files with 212 additions and 67 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PKGBUILD
20 changes: 17 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# Gtk-Theme-Raleigh: Reviving An Era Gone By

## MATE (1.24.1):
<img alt="MATE 1.24.1 desktop with Gtk-Theme-Raleigh" src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/Raleigh-MATE-1-24.png"/>
<img alt="MATE 1.24.1 desktop with Gtk-Theme-Raleigh Dark theme" src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/Raleigh-Dark-MATE-1-24.png"/>
**IMPORTANT NOTICE:** Once you read this file, please see the file
[ZEBRA-STRIPES.md](https://github.com/thesquash/gtk-theme-raleigh/blob/master/ZEBRA-STRIPES.md)
if you would like the most authentic experience possible with this theme!

## MATE (1.26.0):
<img alt="MATE 1.26.0 desktop with Gtk-Theme-Raleigh" src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/Raleigh-MATE-1-26.png"/>
<img alt="MATE 1.26.0 desktop with Gtk-Theme-Raleigh Dark theme" src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/Raleigh-Dark-MATE-1-26.png"/>

## XFCE: (screenshots in progress)

---

Gtk-Theme-Raleigh is a re-creation of the original Raleigh theme, Red Hat's
(and later the GTK Project's) default theme for GTK+ 2. Gtk-Theme-Raleigh
brings a unique early-2000's experience to a modern GTK+ 3-based desktop.
Expand All @@ -27,6 +29,18 @@ many artistic touches of the look-alike theme's own creator; as such, many
"look-alike" themes actually look very different from the themes they are
trying to emulate.

On the other hand, this theme is not purely a knock-off of an old classic
theme. This theme was written from scratch for GTK+ 3, namely GTK+ 3.20 and
above. This package also includes a "dark" variant of the Raleigh theme.
The dark variant is of my own creation and cannot be found anywhere else,
as far as I know. And, even though I simply copied most of the icons in this
theme from old GNOME icon themes and other sources, it took real work to
aggregate all the icons together into this package, and even more work to
rename all the icons to names that modern applications expect. (Most icons in
the original GNOME icon theme were named starting with `gtk-`, whereas modern
applications expect more generic icon names. Example: `gtk-goto-bottom`
versus the modern `go-bottom`.)

## Installation

Run the `install.sh` script provided with this source code:
Expand Down
113 changes: 113 additions & 0 deletions ZEBRA-STRIPES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
# A Notice About Zebra Stripes, What They Are, and How to Get Them

In GTK+ 2, many themes (certainly Raleigh) drew the rows of tree views and
other lists in alternating background colors, when instructed to by the
application. These so-called "zebra stripes" were useful for lists with
many columns of data, since the alternately-colored lines guided the user's
eye as they moved from one column to the next.

Let me show you what I mean by zebra stripes. The following is a screenshot
of a GTK+ 2 application with the original Raleigh theme:

<img src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/GTK-2-Zebra-Stripes.png"/>

Notice how odd-numbered rows are colored slightly differently from
even-numbered rows.

## The Problem

Unfortunately, tree views and lists are not drawn in GTK+ 3 the same way as
they were drawn in GTK+ 2 -- the mechanism changed, and (in my opinion) the
GTK+ 3 way is horribly broken. Officially, there is no way to replicate the
zebra stripes as shown above in a GTK+ 3 application.

On top of that, applications no longer can signal to the theme that they want
a specific list to be "zebra-striped" -- the method to signal such has been
"deprecated" in GTK+ 3, which means that its use is discouraged -- and ever
since the deprecation of that method, the method has been outright broken,
too. So even if applications hinted at which lists they want zebra-striped,
Gtk-Theme-Raleigh still wouldn't pick up on the message, and the theme would
still have no clue as to which lists to zebra-stripe.

If the first hurdle discussed were overcome, it would be possible to simply
theme all lists and tree views with zebra stripes. However, zebra stripes
are not always appropriate (at least in my opinion). The following image, of
the side pane of a GTK+ 3 file manager (Caja), illustrates my point. Are
zebra stripes really appropriate to have here?

<img src="https://raw.githubusercontent.com/thesquash/gtk-theme-raleigh/master/screenshots/Caja-Sidebar-with-Zebra-Stripes.png"/>

## The Solution

Fortunately, there is a solution to this problem. Some months ago, I
contributed a GTK patch to the [`gtk3-classic`](https://github.com/lah7/gtk3-classic)
project, that adds markers known as "style classes" to each cell in a list /
tree view before the theme draws the cell. These extra style classes provide
hints to the theme about whether the cell is part of an odd- or even-numbered
row, and whether the cell is part of the column by which the list is sorted.
The theme can then use this extra information to color the cell appropriately
and thus display zebra stripes.

There are only two problems with this approach. The first problem is that
this means that, if you want zebra stripes, you need to install the special
patched version of GTK+ 3 provided by
[`gtk3-classic`](https://github.com/lah7/gtk3-classic). That might entail
compiling the code yourself. (According to the maintainer of the project,
`gtk3-classic` is available for several Linux distributions pre-compiled,
which means you might not need to compile it yourself.)

**TIP:** If you install `gtk3-classic`, you will probably need to log out
of your desktop and then log back in before switching to Gtk-Theme-Raleigh.
Otherwise, the zebra stripes may not appear immediately after installing
`gtk3-classic`.

The other problem is that, once again, Gtk-Theme-Raleigh doesn't know which
lists to zebra-stripe. Right now, I implement a compromise:
Gtk-Theme-Raleigh only themes the tree views of select file managers --
currently, the GTK+ file chooser dialog, Caja (MATE), Nemo (Cinnamon), and
Thunar (XFCE). All other tree views lack zebra stripes.

## In the Future

I plan to submit a revision of my original patch to `gtk3-classic`, that marks
list cells with yet another style class. If this style class is present, it
means the list view has column headings (the gray buttons above the list that
label each column). If this style class is present, then it's probably a
safe bet that it would be appropriate to zebra-stripe the list in question.

**Rationale**: I've noticed that most GTK+ 2 applications (that I've
seen) that draw column headings above a list, also request for that same list
to be zebra-striped. This makes sense because normally, if a list has only
one or two columns, the list probably is not very wide, column heading buttons
aren't needed (their primary purpose is actually to select by which column the
list is sorted), and thus one's eye doesn't need zebra stripes to follow the
row from one column to another. Heck, if the list has only one column (like
the Caja side pane as shown above), you don't even *need* to look at a second
column -- you can't!

## In Summary

Zebra striping, believe it or not, is controversial. Some people couldn't
care less about them. Others believe zebra stripes are essential.
(Full disclosure: I personally don't care for zebra stripes, though I'll
admit that they can be useful when they are present.) GTK+ 3 doesn't make
it easy to display zebra stripes, although an unofficial means to display
them exists, in the form of the patches from the
[`gtk3-classic`](https://github.com/lah7/gtk3-classic) project. If there
is a pre-built version of that project available for your distribution, then
installation is simple. If not, then installation will most likely involve
compiling software yourself, which is not the most trivial task.

In the end, the choice is with you. If you absolutely must have zebra
stripes, Gtk-Theme-Raleigh has (currently limited) support for zebra stripes
just waiting for you to use, and once you install `gtk3-classic` (and log
out and log back in), you should have zebra stripes in your applications.
If you don't care enough about the issue, then by all means, don't bother
installing `gtk3-classic`. Gtk-Theme-Raleigh will look and perform just
fine without the optional dependency for zebra stripes. You'll still be
getting a far more authentic experience from this theme than from pretty
much any other GTK+ 3 theme on the Internet.

---

Thank you for taking the time to read this.
Binary file modified icons/Raleigh/generic/48/folder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions icons/Raleigh/gnome/16/org.gnome.DiskUtility.png
1 change: 1 addition & 0 deletions icons/Raleigh/gnome/24/org.gnome.DiskUtility.png
1 change: 1 addition & 0 deletions icons/Raleigh/gnome/48/org.gnome.DiskUtility.png
25 changes: 24 additions & 1 deletion icons/Raleigh/index.theme
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[Icon Theme]
Name=Raleigh
Comment=A redo of the GNOME icon theme as it stood until 2006
Directories=generic/16,generic/20,generic/24,generic/32,generic/48,mate/16,mate/20,mate/24,mate/32,mate/48,other/16,other/20,other/24,other/32,other/48
Directories=generic/16,generic/20,generic/24,generic/32,generic/48,gnome/16,gnome/24,gnome/48,mate/16,mate/20,mate/24,mate/32,mate/48,other/16,other/20,other/24,other/32,other/48


# Generic icons not specific to any desktop environment or application in
Expand All @@ -28,6 +28,29 @@ Size=48
Type=Fixed


# Icons specific to GNOME and GNOME applications

[gnome/16]
Size=16
Type=Fixed

[gnome/20]
Size=20
Type=Fixed

[gnome/24]
Size=24
Type=Fixed

[gnome/32]
Size=32
Type=Fixed

[gnome/48]
Size=48
Type=Fixed


# Icons specific to MATE and MATE applications

[mate/16]
Expand Down
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
# by all users on the system).
#
# This script was written by Gordon N. Squash for his Gtk-Theme-Raleigh set of
# themes, but may be used by others under the conditions of the GNU GPL version
# 3 or (at your option) any later version of the GPL.
# themes, but may be used by others under the conditions of the GNU LGPL version
# 3 or (at your option) any later version of the LGPL.

# The themes to install.
GTK_THEMES="Raleigh Raleigh-Dark"
Expand Down
Binary file added screenshots/Caja-Sidebar-with-Zebra-Stripes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added screenshots/GTK-2-Zebra-Stripes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/Raleigh-Dark-MATE-1-24.png
Binary file not shown.
Binary file removed screenshots/Raleigh-MATE-1-24.png
Binary file not shown.
23 changes: 2 additions & 21 deletions themes/Raleigh/gtk-3.0/gtk-assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,8 @@ paned.vertical > separator
* Arrows *
******************************************************************************/


/*
* Many of the following statements are for our right-to-left users.
*
* Admittedly, we wouldn't need this duplicative code if we used stock symbolic
* icons, but our custom icons look way better (or at least older-fashioned)
* than the GTK symbolic icons that we could use. Well, at least IMHO.
*/

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.up,
scrollbar.horizontal > contents > button.down:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:dir(rtl)
{
Expand All @@ -178,17 +168,15 @@ expander > title > arrow:dir(rtl)

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.down,
scrollbar.horizontal > contents > button.up:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow
expander > title > arrow:dir(ltr)
{
background-image: url('../gtk-assets/light/arrows/arrow-right.png');
}


/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.up:disabled,
scrollbar.horizontal > contents > button.down:disabled:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:disabled:dir(rtl)
{
Expand All @@ -198,20 +186,13 @@ expander > title > arrow:disabled:dir(rtl)

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.down:disabled,
scrollbar.horizontal > contents > button.up:disabled:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:disabled
expander > title > arrow:disabled:dir(ltr)
{
background-image: url('../gtk-assets/light/arrows/arrow-right-disabled.png');
}


/*
* Fortunately, however, vertical scrollbar buttons don't need
* right-to-left-specific style rules. So we can relax in this section...
*/


/* From widgets/ranges.css */
scrollbar.vertical > contents > button.up
{
Expand Down
23 changes: 2 additions & 21 deletions themes/Raleigh/gtk-3.0/gtk-dark-assets.css
Original file line number Diff line number Diff line change
Expand Up @@ -157,18 +157,8 @@ paned.vertical > separator
* Arrows *
******************************************************************************/


/*
* Many of the following statements are for our right-to-left users.
*
* Admittedly, we wouldn't need this duplicative code if we used stock symbolic
* icons, but our custom icons look way better (or at least older-fashioned)
* than the GTK symbolic icons that we could use. Well, at least IMHO.
*/

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.up,
scrollbar.horizontal > contents > button.down:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:dir(rtl)
{
Expand All @@ -178,17 +168,15 @@ expander > title > arrow:dir(rtl)

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.down,
scrollbar.horizontal > contents > button.up:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow
expander > title > arrow:dir(ltr)
{
background-image: url('../gtk-assets/dark/arrows/arrow-right.png');
}


/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.up:disabled,
scrollbar.horizontal > contents > button.down:disabled:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:disabled:dir(rtl)
{
Expand All @@ -198,20 +186,13 @@ expander > title > arrow:disabled:dir(rtl)

/* From widgets/ranges.css */
scrollbar.horizontal > contents > button.down:disabled,
scrollbar.horizontal > contents > button.up:disabled:dir(rtl),
/* From widgets/expanders.css */
expander > title > arrow:disabled
expander > title > arrow:disabled:dir(ltr)
{
background-image: url('../gtk-assets/dark/arrows/arrow-right-disabled.png');
}


/*
* Fortunately, however, vertical scrollbar buttons don't need
* right-to-left-specific style rules. So we can relax in this section...
*/


/* From widgets/ranges.css */
scrollbar.vertical > contents > button.up
{
Expand Down
8 changes: 5 additions & 3 deletions themes/Raleigh/gtk-3.0/widgets/color-choosers.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ colorswatch
*/
colorswatch#add-color-button
{
background-color: @bg_color;
background-color: @bg_color;
border-image-width: 1px 2px 2px 1px;
border-image-slice: 1 2 2 1;
}
Expand All @@ -60,10 +60,12 @@ colorswatch#add-color-button:hover
* they just selected.
*/
colorswatch:selected,
colorswatch:selected > overlay
colorswatch:selected > overlay,
colorswatch:selected:not(:focus),
colorswatch:selected:not(:focus) > overlay
{
background-color: transparent;
-gtk-icon-source: -gtk-icontheme('gtk-apply');
-gtk-icon-source: -gtk-icontheme('gtk-apply');
}

colorswatch.dark:selected > overlay
Expand Down
Loading

0 comments on commit c54c134

Please sign in to comment.