forked from AuroraMiddleware/gtk
Fix alignment and icons in spin buttons
svn path=/trunk/; revision=22242
This commit is contained in:
parent
5cbb3eae97
commit
8437d89566
@ -1,3 +1,8 @@
|
||||
2009-01-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
* gtk/gtkentry.c: Use the get_text_area_size vfunc to make
|
||||
alignment and icons in spin buttons work correctly.
|
||||
|
||||
2009-01-27 Matthias Clasen <mclasen@redhat.com>
|
||||
|
||||
Bug 569336 – change in gtkbutton klass is causing crash when
|
||||
|
@ -449,8 +449,6 @@ static void gtk_entry_do_popup (GtkEntry *entry,
|
||||
GdkEventButton *event);
|
||||
static gboolean gtk_entry_mnemonic_activate (GtkWidget *widget,
|
||||
gboolean group_cycling);
|
||||
static void gtk_entry_state_changed (GtkWidget *widget,
|
||||
GtkStateType previous_state);
|
||||
static void gtk_entry_check_cursor_blink (GtkEntry *entry);
|
||||
static void gtk_entry_pend_cursor_blink (GtkEntry *entry);
|
||||
static void gtk_entry_reset_blink_time (GtkEntry *entry);
|
||||
@ -459,6 +457,11 @@ static void gtk_entry_get_text_area_size (GtkEntry *entry,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static void get_text_area_size (GtkEntry *entry,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
static void get_widget_window_size (GtkEntry *entry,
|
||||
gint *x,
|
||||
gint *y,
|
||||
@ -2246,7 +2249,7 @@ get_icon_allocations (GtkEntry *entry,
|
||||
GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (entry);
|
||||
gint x, y, width, height;
|
||||
|
||||
gtk_entry_get_text_area_size (entry, &x, &y, &width, &height);
|
||||
get_text_area_size (entry, &x, &y, &width, &height);
|
||||
|
||||
primary->y = y;
|
||||
primary->height = height;
|
||||
@ -2601,7 +2604,7 @@ gtk_entry_realize (GtkWidget *widget)
|
||||
widget->window = gdk_window_new (gtk_widget_get_parent_window (widget), &attributes, attributes_mask);
|
||||
gdk_window_set_user_data (widget->window, entry);
|
||||
|
||||
gtk_entry_get_text_area_size (entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height);
|
||||
get_text_area_size (entry, &attributes.x, &attributes.y, &attributes.width, &attributes.height);
|
||||
|
||||
if (GTK_WIDGET_IS_SENSITIVE (widget))
|
||||
{
|
||||
@ -2775,7 +2778,7 @@ place_windows (GtkEntry *entry)
|
||||
GtkAllocation secondary;
|
||||
EntryIconInfo *icon_info = NULL;
|
||||
|
||||
gtk_entry_get_text_area_size (entry, &x, &y, &width, &height);
|
||||
get_text_area_size (entry, &x, &y, &width, &height);
|
||||
|
||||
get_icon_allocations (entry, &primary, &secondary);
|
||||
|
||||
@ -2835,6 +2838,24 @@ gtk_entry_get_text_area_size (GtkEntry *entry,
|
||||
*height = requisition.height - yborder * 2;
|
||||
}
|
||||
|
||||
static void
|
||||
get_text_area_size (GtkEntry *entry,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height)
|
||||
{
|
||||
GtkEntryClass *class;
|
||||
|
||||
g_return_if_fail (GTK_IS_ENTRY (entry));
|
||||
|
||||
class = GTK_ENTRY_GET_CLASS (entry);
|
||||
|
||||
if (class->get_text_area_size)
|
||||
class->get_text_area_size (entry, x, y, width, height);
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
get_widget_window_size (GtkEntry *entry,
|
||||
gint *x,
|
||||
|
Loading…
Reference in New Issue
Block a user