gtk+ r20368 - in trunk: . gtk
- From: matthiasc svn gnome org
- To: svn-commits-list gnome org
- Subject: gtk+ r20368 - in trunk: . gtk
- Date: Fri, 13 Jun 2008 04:56:25 +0000 (UTC)
Author: matthiasc
Date: Fri Jun 13 04:56:25 2008
New Revision: 20368
URL: http://svn.gnome.org/viewvc/gtk+?rev=20368&view=rev
Log:
Fix frame size allocation
Modified:
trunk/ChangeLog
trunk/gtk/gtkentry.c
Modified: trunk/gtk/gtkentry.c
==============================================================================
--- trunk/gtk/gtkentry.c (original)
+++ trunk/gtk/gtkentry.c Fri Jun 13 04:56:25 2008
@@ -47,6 +47,7 @@
#include "gtkseparatormenuitem.h"
#include "gtkselection.h"
#include "gtksettings.h"
+#include "gtkspinbutton.h"
#include "gtkstock.h"
#include "gtktextutil.h"
#include "gtkwindow.h"
@@ -1558,16 +1559,22 @@
GdkRectangle *area)
{
GtkEntryPrivate *priv = GTK_ENTRY_GET_PRIVATE (widget);
- gint x, y, width, height;
- gint xborder, yborder;
-
- get_text_area_size (GTK_ENTRY (widget), &x, &y, &width, &height);
- _gtk_entry_get_borders (GTK_ENTRY (widget), &xborder, &yborder);
+ gint x = 0, y = 0, width, height;
- x -= xborder;
- y -= yborder;
- width += xborder * 2;
- height += yborder * 2;
+ gdk_drawable_get_size (widget->window, &width, &height);
+
+ /* Fix a problem with some themes which assume that entry->text_area's
+ * width equals widget->window's width */
+ if (GTK_IS_SPIN_BUTTON (widget))
+ {
+ gint xborder, yborder;
+
+ get_text_area_size (GTK_ENTRY (widget), &x, NULL, &width, NULL);
+ _gtk_entry_get_borders (GTK_ENTRY (widget), &xborder, &yborder);
+
+ x -= xborder;
+ width += xborder * 2;
+ }
if (GTK_WIDGET_HAS_FOCUS (widget) && !priv->interior_focus)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]