Spacing in GPE apps

From: Colin Marquardt <colin.a.t.marquardt-home.de>
Date: Wed Sep 18 2002 - 12:39:29 EDT

Hi all,

starting with version 0.25, libgpewidget defines simple accessor
functions (gpe_get_*) that return constants (and a string) that
should be used for spacing values (in file spacing.c).

I have copied the text below from the Gnome 2 HIG (see
http://handhelds.org/z/wiki/GpeHIG and
http://developer.gnome.org/projects/gup/hig/1.0/layout.html#layout-window)
to show how they arer meant to be used in principle.
The respective libgpewidget functions are in square brackets.

"[maindialog]" etc. are widget names to help me build a
gpe-helloworld app and not get lost :-)

Please use the gpe_get_* functions to define spacings when you write
new code, so that we'll get a consistent set of apps
eventually. Feel free to add more functions if needed.

gpe-conf in CVS uses these function in some of the applets already
(I'm slowly converting the existing applets).

Oh, one more thing: I left the values in the text below as they
were, but the accessor functions will return half that
value. Eventually, these will be different according to e.g. the
display size.

,--[ http://developer.gnome.org/projects/gup/hig/1.0/layout.html#layout-window ]--
| Technical Details for Proper Layout
|
| Set Border Width for the GtkDialog [maindialog] to 12
| [gpe_get_border()]. Place a GtkVBox [categories] containing as
| many rows as you wish to have categories inside the control area
| of the GtkDialog, and set the Spacing for the GtkVBox to 18
| [gpe_get_catspacing()].
|
| In turn, each category should be composed of a GtkVBox [catvbox#]
| with two rows. Set the Spacing to 6 [gpe_get_boxspacing()].
|
| * In the top row, place a label [catlabel#] for the category
| header. Make the label bold using the Pango markup <span
| weight="bold">Category Header</span> Set the label property
| Use Markup to Yes, and X Align to 0.0 to left align the label.
|
| * Place a 2-columned GtkHBox [catconthbox#] in the lower row of
| the top-level GtkVBox.
|
| o In the left column, place a label [catindentlabel#]
| containing four space characters
| [gpe_get_catindent()]. This will serve to indent the
| category contents.
|
| o In the right column, place a GtkVBox [controlvbox#]
| containing a row per control you wish to place in the
| category. Set the Spacing to 6 [gpe_get_boxspacing()].
|
| + For left-side labelled controls such as text
| boxes, option menus, and many others, place a 2
| columned GtkHBox inside the row with a label in the
| left column and the corresponding control in the
| right. Set the Spacing on the GtkHBox to 6
| [gpe_get_boxspacing()]. Place all labels such as
| this (for the whole window) in the same GtkSizeGroup
| (there is currently no way to do this using only
| Glade, you will have to use code as well). This will
| align the controls to their right, even between
| categories, which is important for allowing quick
| visual scans.
|
| + For right-side labelled controls such as check
| boxes and radio buttons, simply place them directly
| in the row.
`----

Cheers,
  Colin

-- 
/join #gpe on irc.openprojects.net
Received on Wed Sep 18 16:40:56 2002

This archive was generated by hypermail 2.1.8 : Tue May 04 2004 - 09:41:29 EDT