Justified and ancient

Although it’s common for Metacity themes to have centred titles, there are still several themes which have the title justified to the left or right . GNOME bug 612940 makes the not unreasonable suggestion that the justification should be swapped when the system is running in a language such as Hebrew, Arabic, or Urdu which is written from right to left.

There is a patch supplied, but it swaps only the position of the text. This isn’t a problem when the titlebar’s decoration is symmetrical, but when (as in the case of Crux) it isn’t, the title moves without taking the decoration along for the ride.  See the illustration on the right; the word “שלום” is written in white on the grey part of the titlebar instead of on the blue part.

The way forward from here might be:

  • to leave everything as it is
  • to commit this patch, and hope that people who speak these languages will avoid themes with non-centred window titles and asymmetrical titlebars
  • to mirror the entire window border decoration if we’re running in a right-to-left language.  This may be non-trivial.

Your thoughts, gentle reader, are as welcome as they ever were.

5 Comments

  1. Posted May 14, 2010 at 9:46 pm | Permalink

    I don’t believe this should be something for the window manager to fix but the themes themselves. At most the window manager should provide the theme builders with a way to prepare for both options (probably optional and not as a requirement seeing as how themes with center-aligned titles wouldn’t need it).

  2. Posted May 15, 2010 at 12:48 am | Permalink

    Talk to a few rigth-to-left writing GNOME developers and see what they think.

    I guess they are already avoiding themes with left-justified already, even if not completely. In that sense, the proposed patch wouldn’t be much harmful or useful.

    If, on the other hand, people really miss rigth-justification, than Metacity and its progeny should consider a full mirror of the titlebar.

  3. Personage
    Posted May 15, 2010 at 2:24 am | Permalink

    Personally I lean towards Dextro’s opinion, but then I don’t use rtl languages.
    Definitely not option two, but I wouldn’t go with option three without, as Leonardo suggested, asking someone who cares.

  4. Screwtape
    Posted May 15, 2010 at 11:37 am | Permalink

    Given how left-to-right-centric a Metacity theme can be (and Crux is a great example), the only real way to handle an arbitrary theme is to mirror the entire coordinate system.

    The default GTK widgets are drawn with a top-left light-source (the top and left-hand sides of embossed shapes are drawn lighter), most of the custom pixmaps in Metacity themes are likely to follow suit. If you flip the entire window decoration left-to-right, you might wind up with window-decorations lit from the top-right while controls are lit from the top-left… but that’s probably a lesser sin than drawing text in white on a light-grey background, as in your screenshot.

  5. Posted May 17, 2010 at 9:46 am | Permalink

    As RTL user I would vote for option 3 but there may be some issues with this option:

    Suppose the theme contains image that has some “water-marked” text in the backgroud or some kind of assymetrical Logo. displaying such image as mirrored would look funny.
    Another example: In a Theme that displays the face of Cindy Crawford in the background – her mole would appear on the wrong side!

    Best solution IMO is to provide theme authors with the ability control it (so they can select to provide alternative images for RTL theme or just use a plain flipping algorithm)

    Until that happen, I think I would rather the current patch to be committed (option 2). I think in most common cases it will be more useable this way.