Re: [evolution-patches] Esc-closeability of the composer's search dialog
- From: Anna Marie Dirks <anna ximian com>
- To: Federico Mena Quintero <federico ximian com>
- Cc: evolution-patches ximian com
- Subject: Re: [evolution-patches] Esc-closeability of the composer's search dialog
- Date: 11 Jun 2003 12:10:03 -0400
Hi Federico:
Thanks very much for working on this! Your time and energy are awfully appreciated. My thoughts are:
* Yes, please, the "ESC" to close bit of this patch looks super.
* Looking at the two screenshots, it seems to me that the pudgy little composer search dialog was actually closer to the HIG's recommended spacing/padding. To quote:
- Leave a 12-pixel border between the edge of the window and the nearest controls.
- Leave a 12-pixel horizontal gap between a control and its label. (The gap may be bigger for other controls in the same group, due to differences in the lengths of the labels.)
- Labels must be concise and make sense when taken out of context. Otherwise, users relying on screenreaders or similar assistive technologies will not always be able to immediately understand the relationship between a control and those surrounding it.
- Assign access keys to all editable controls. Ensure that labels immediately precede their associated control in the tab order, so that the access key will focus to or activate the correct control when pressed.
(from http://developer.gnome.org/projects/gup/hig/1.0/layout.html#window-layout-spacing)
and also:
Guidelines
- As a basic rule of thumb, leave space between user interface components in increments of 6 pixels, going up as the relationship between related elements becomes more distant. For example, between icon labels and associated graphics within an icon, 6 pixels are adequate. Between labels and associated components, leave 12 horizontal pixels. For vertical spacing between groups of components, 18 pixels is adequate. A general padding of 12 pixels is recommended between the contents of a dialog window and the window borders.
- Break long lists of choices into smaller groups. For lists of less than about eight items, use radio buttons or check boxes. For longer lists, use a list control or option menu.
- Try to keep elements of the same type left-aligned with each other. For instance, in Figure 8.4, the group titles (General and Actions) are left-aligned and justified with each other.
- Indent group members 12 pixels to denote hierarchy and association.
- Minimize the number of alignment points in your window. An alignment point is an imaginary vertical or horizontal line through your window that touches the edge of one or more labels or controls in the window.
Etc, etc, etc. I would feel more warm and fuzzy about these spacing/padding guidelines if they were accompanied by a spot of research/data--- something to give the scientific/psychological context for why their suggestions are desirable. My tendency when I was trying to hig-ify the spacing of Evo's various dialogs was to be somewhat conservative in how I interpreted these guidelines. At any rate that snippet was from the same webpage as the previous one.
(NB: In the new draft of the HIG, the relevant section of which is available here:
http://developer.gnome.org/projects/gup/hig/hig-diff/layout.html#window-layout-spacing, it looks to me like the HIG folks are still kinda feeling their way around this type of guideline... check the massively red section where the technical details of how to achieve their desired spacing/padding used to be. :)
To be honest with you, the things which I'd like to have you look at in the composer's dialog are: a) Why is there no label associated with the search entry? This is rather non-accessible-- the screenreader people really need, as I understand it, their controls to be labeled... and b) The capitalization style on "Case Sensitive" varies between the two dialogs. The labels of checkboxes are supposed to be capitalized sentence-style. Oh-- and another thing: the "Find" label in the "Find in Message" dialog should have an accelerator.
What would you think about redoing the layout part of this patch to add the label, standardize the capitalization style between the two dialogs, add an accelerator to the "Find" label in "Search in Message", and change the padding/spacing of the mailer's dialog to conform to the padding/spacing of the composer's dialog (since it is, indeed, more "correct").
Thank you in advance,
best,
Anna
On Tue, 2003-06-10 at 20:35, Federico Mena Quintero wrote:
Hi,
This patch is similar to the one I sent for the mailer a week ago. It
makes the search dialog in the composer take the Escape key to close
it. The patch also removes unnecessary padding so that the dialog is
consistent with other dialogs, in particular the mailer's Search Mail
dialog. See the attached screenshot for the inconsistency.
Is it OK to commit?
Federico
Index: search.c
===================================================================
RCS file: /cvs/gnome/gtkhtml/components/html-editor/search.c,v
retrieving revision 1.22
diff -u -r1.22 search.c
-- search.c 12 May 2003 20:46:48 -0000 1.22
+++ search.c 11 Jun 2003 00:31:54 -0000
@@ -70,11 +70,19 @@
{
GtkHTMLSearchDialog *dialog = g_new (GtkHTMLSearchDialog, 1);
GtkWidget *hbox, *vbox;
+ GtkAccelGroup *accel_group;
+ GtkWidget *button;
+
+ dialog->dialog = GTK_DIALOG (gtk_dialog_new ());
+ gtk_window_set_title (GTK_WINDOW (dialog->dialog), _("Find"));
+
+ button = gtk_dialog_add_button (dialog->dialog, GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
+ accel_group = gtk_accel_group_new ();
+ gtk_window_add_accel_group (GTK_WINDOW (dialog->dialog), accel_group);
+ gtk_widget_add_accelerator (button, "activate", accel_group, GDK_Escape, 0, GTK_ACCEL_LOCKED);
+
+ gtk_dialog_add_button (dialog->dialog, GTK_STOCK_FIND, 0);
- dialog->dialog = GTK_DIALOG (gtk_dialog_new_with_buttons (_("Find"), NULL, 0,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- GTK_STOCK_FIND, 0,
- NULL));
dialog->entry = gtk_entry_new ();
dialog->backward = gtk_check_button_new_with_mnemonic (_("_Backward"));
dialog->case_sensitive = gtk_check_button_new_with_mnemonic (_("Case _sensitive"));
@@ -93,10 +101,8 @@
gtk_widget_show (vbox);
gtk_box_pack_start (GTK_BOX (vbox), dialog->entry, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog), 6);
gtk_container_set_border_width (GTK_CONTAINER (vbox), 6);
gtk_container_set_border_width (GTK_CONTAINER (dialog->dialog->vbox), 6);
- gtk_box_set_spacing (GTK_BOX (dialog->dialog->vbox), 6);
gtk_box_pack_start (GTK_BOX (dialog->dialog->vbox), vbox, FALSE, FALSE, 0);
gtk_widget_show (dialog->entry);
gtk_widget_show_all (hbox);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]