SeaX11 is a very colourful design. It uses a split complementary colour-scheme. The complementary colours are never combined as foreground and background, to make it still acceptable for colour blind people.
The three defining colours: magenta, blue and orange have almost the same contrast. This contrast is varied by an radial gradient in the background and some lighter variant for the scripttool . The scripttool and palettes are re-arranged, so that the orange part becomes a prominent feature.
The SeaX11 design is widely applicable. It is suitable for hyper-sensitive eyesight. SeaX11 operates well in light and dimmed environments as-well.
The modest contrast makes SeaX11 suitable for persons with astigmatism.
The designs presented in the section called “Bright Designs under X Window System” and the section called “Dark Designs under X Window System” address normal usage, hyper-sensitive, astigmatism and to some extent diminished eyesight. All of this might still not suffice to create a usable Graphical User Interface, which will be addressed in this section.
Diminished eyesight requires large fonts and icons. Jeszra is a fully vectorized application. There are no bitmaps whatsoever being used inside the Graphical User Interface.
Jeszra’s icons are font glyphs from the »Gestalt.ttf« font or complex vector graphics. . The font »Gestalt.ttf« must have been installed for using glyphs as icons. Otherwise Jeszra deploys bitmaps as a fall-back solution.
The simplest method to increase fonts and
icons is to heighten the resolution.
Tcl/Tk features a special command
tk scaling
, which queries the display
resolution and allows to redefine the resolution for the
running application.
tk scaling
must be altered before any window
–except for the Tk-root window– gets created.
Specifying tk scaling
later
results in a mostly unusable Graphical User Interface, featuring
elements with mixed resolutions.
Example 5.3. Using tk scaling
#!/bin/sh # Restart with WISH \ exec wish "$0" ${1+"$@"} tk scaling 1.5 source ./lightX11.tcl ...
Example 5.3, “Using tk scaling” sets the resolution to 108ppi. The icons and fonts increase by 50%. The default value for scaling is 1.0, which is identical to 72ppi.
Most X Window System servers are configured with the wrong resolution. In most situations the resolution is set to 72ppi, which results in to small fonts. Today, display resolution varies between 86ppi and 150ppi. The display, I am writing this, features 92ppi and scaling should report 1.28, it reports 1.04. Setting scaling to 1.5 makes fonts and icons only 20% to large, on default X Window System fonts and icons are 30% to small!
Do not try to mitigate a misconfigured X Window System server by specifying fonts in pixels.
A pixel size font features a negative value for its size
argument: {bitstream vera sans} -10
, is a
10 pixel font. Instead rely on tk scaling to correct the
resolution.
Example 5.3, “Using tk scaling” calls lightX11 and it has to be placed inside the same directory –indicated by the leading dot-slash ./ – the Jeszra home directory. Of course, all the presented designs are resolution independent and may be used with any scaling value.
Short sighted people tend to reduce the Graphical User Interface font size. Reducing the font makes more of the Graphical User Interface visible from a short distance. Instead of designing for short-sightness: use tk scaling , by reducing its value below the display resolution, to support short-sighted people.
Every non functional aspect of Jeszra is customized through the Option Database. The various designs, ranging from AQUA® to the section called “Inside Documentation”, are nothing else but Option Database variations. There is an alternative approach to customizing the Option Database: The Option Database is inspired by the X Resource Database and can be utilized in the same way. was already mentioned. Jeszra seeks to load a special resource file Jeszra from the XAPPLRESDIR. The Jeszra resource file is located in the following order:
/etc/X11/app-defaults/Jeszra
file join $env(XAPPLRESDIR) Jeszra
The ~/app-defaults
directory
, in the user’s home-directory, gets searched whenever
the environment variable XAPPLRESDIR
is undefined.
The resource file »BigFonts« customizes the »highlightThickness« and »font« properties of some window classes. An increased »highlightThickness« is very desirable on mobile devices –even for people with normal eyesight.
Example 5.4. BigFonts highlightThickness
... *Button.highlightThickness: 5p *Menubutton.highlightThickness: 5p *Radiobutton.highlightThickness: 5p *Checkbutton.highlightThickness: 5p *Rtl_gridwin.highlightthickness: 5p *Gistbox.highlightThickness: 5p *Rtl_combobox.highlightthickness: 5p *Rtl_gridwin*Text.borderWidth: 0 *Rtl_gridwin*Text.highlightThickness: 0 *Rtl_gridwin*Listbox.highlightThickness: 0 ...
Example 5.4, “BigFonts highlightThickness” displays an excerpt from BigFonts related to »highlightThickness«. higlightThickness is set to 5 point for every »Button« control. The »p« (point) after 5 instructs Tk, that »5« is an resolution independent value.
Example 5.5. BigFonts Fonts
... *font: {bitstream vera sans} 18 *Rtl_mlistbox.headerFont: {bitstream vera sans} 12 *Entry.font: {bitstream vera sans} 18 *Listbox.font: {bitstream vera sans} 18 *Message.font: {bitstream vera sans} 12 *Goolbar.font: {bitstream vera sans} 18 *Text.font: {bitstream vera sans mono} 18 *Rtl_tree.font: {bitstream vera sans} 18 *Rtl_tabset.font: {bitstream vera sans} 18
Example 5.6. TkPath Specific Resources
*Rtl_tree.fontfamily: {bitstream vera sans} *Rtl_tree.fontsize: 18
Example 5.7. Jeszra Specific Resources
*document*glyphFontFamily: Gestalt *document*glyphFontSize: 24 *Gestalt.mbar*font: {bitstream vera sans} 21
»glyphFontFamily« and »glyphFontSize« in Example 5.7, “Jeszra Specific Resources” defines the icon font inside the Jeszra hierarchy view. These entries are application specific and thus the full window pathname is stated, starting from the window with class »Gestalt«: *Gestalt.space.document.hierarchy.
The resource entries »fontfamily« and »fontsize« in Example 5.6, “TkPath Specific Resources” are TkPath related entries. The Rtl_tabset window uses separate font definitions for Tk fonts and those originating from TkPath.
The Aquaish resource file gets used in combination with AQUA®. Its purpose is to vectorize the entire Graphical User Interface under AQUA®, with the intent to create Scalable Vector Graphics from it. These resource file instructs Gstripes to ignore the original AQUA® controls and to supplant them. The Gstripes Option Database property ».force« controls this behavior.
The conventional AQUA® controls in Tk, are created from bitmaps, which limits the possible resolution of a printout, Scalable Vector Graphics or PDF to the resolution of the display. The default resolution setting for AQUA® is 72dpi–actual ppi . Aquaish replaces most of these controls through vector graphics and thus utilizes the resolution of the target medium–the printer for example.
Aquaish deploys multiple layered, semi-transparent gradients to generate the AQUA®-look. Support for transparency and layered gradients is currently incomplete in FOP, which is why Figure 5.6, “Aquaish General Preferences” differs markedly from the original Scalable Vector Graphics.
Example 5.8. The Aquaish Resources
*force: 1 *fashion: 3D *font: system 12 *Entry.font: Monaco 12 *Listbox.font: application 10 *Menubutton.takeFocus: 1 *Rtl_mlistbox.headerFont: application 10 *Message.font: system 10 *Goolbar.font: system 10 *Text.font: Monaco 12 *space.document.hierarchy.glyphFontSize: 12 *space.document.hierarchy.font: system 12 *space.document.hierarchy.indenty: 23 *Gsearch.find.default: active *Gfilter.apply.default: active *Menubutton.padY: 2 *Radiobutton.padY: 5
The first entry »*force: 1« in Example 5.8, “The Aquaish Resources” tells Gstripes to ignore any built-in constraints and forces it to hijack: menubutton, button, radiobutton and checkbutton, which are normally not hijacked under AQUA® or Microsoft® Windows®. The resource file is also the proper place to substitute fonts for licensed redistribution reasons.
Champagne coloured alters the colour design. It can be combined with WhiteX11, lightX11, GrayX11 and SafariX11. Champagne in combination with WhiteX11 produces a yellowish toned metallic finish. The combination with lightX11 a recycled paper-like design. Most figures inside this book are based on this paper design.
Figure 5.7, “Champagne Coloured” shows the combination with WhiteX11.
Figure 5.8, “Recycled Paper” shows the same resource file in combination with lightX11.
Example 5.9. Excerpt from Champagne Coloured
*background: cornsilk3
*foreground: gray27
*highlightBackground: cornsilk3
*Rtl_gridwin.troughcolor: gray98
*Scrollbar.background: white
*Rtl_gridwin.background: white
*Rtl_gridwin.borderFrame.gradient: gray98
*borders: 1
*Galette.background: cornsilk4
*Galette.gripcenter*background: cornsilk4
*Galette.foreground: white
*Entry.background: white
*Entry.foreground: black
*disabledBackground: cornsilk3
*Entry.alternateBackground: gray97
*Button.selectColor: #f6f0d4
*Listbox.background: white
*Listbox.foreground: black
*Text.background: white
*Text.foreground: black
*Rtl_tree.background: white
*Rtl_tree.foreground: black
*Rtl_mlistbox.background: white
*Rtl_mlistbox.foreground: black
*Rtl_mlistbox.color1: gray98
*Rtl_mlistbox.color3: gray98