]> Pileus Git - ~andy/gtk/commitdiff
Use rough font-based spacing for the completion entry's suggestion window
authorFederico Mena Quintero <federico@novell.com>
Fri, 14 Mar 2008 02:13:54 +0000 (02:13 +0000)
committerFederico Mena Quintero <federico@src.gnome.org>
Fri, 14 Mar 2008 02:13:54 +0000 (02:13 +0000)
2008-03-13  Federico Mena Quintero  <federico@novell.com>

* gtk/gtkfilechooserentry.c (show_completion_feedback_window): Put
the feedback window at entry_height/2 pixels to the right of the
cursor, for a cheap "M-width / 2" spacing.

Signed-off-by: Federico Mena Quintero <federico@gnu.org>
svn path=/trunk/; revision=19869

ChangeLog
gtk/gtkfilechooserentry.c

index 31573f711e904756510ae92412fceab51500bb5b..c8587be97a362fc8c5ea4ea8823cf13d6e262f86 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2008-03-13  Federico Mena Quintero  <federico@novell.com>
+
+       * gtk/gtkfilechooserentry.c (show_completion_feedback_window): Put
+       the feedback window at entry_height/2 pixels to the right of the
+       cursor, for a cheap "M-width / 2" spacing.
+
 2008-03-13  Sven Neumann  <sven@gimp.org>
 
        * gtk/gtkfilechooserdefault.c
index e67458239261f33cdf45b5a5b468461cb6b4e713..c97fb08fc3979b8f9d3277d074bcd64a5f6f91ab 100644 (file)
@@ -947,7 +947,8 @@ show_completion_feedback_window (GtkFileChooserEntry *chooser_entry)
 
   get_entry_cursor_x (chooser_entry, &cursor_x);
 
-  feedback_x = entry_x + cursor_x + 2; /* FIXME: fit to the screen if we bump on the screen's edge */
+  /* FIXME: fit to the screen if we bump on the screen's edge */
+  feedback_x = entry_x + cursor_x + entry_allocation->height / 2; /* cheap "half M-width" */
   feedback_y = entry_y + (entry_allocation->height - feedback_req.height) / 2;
 
   gtk_window_move (GTK_WINDOW (chooser_entry->completion_feedback_window), feedback_x, feedback_y);