summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--ChangeLog.pre-2-1014
-rw-r--r--ChangeLog.pre-2-414
-rw-r--r--ChangeLog.pre-2-614
-rw-r--r--ChangeLog.pre-2-814
-rw-r--r--gtk/gtkspinbutton.c43
6 files changed, 90 insertions, 23 deletions
diff --git a/ChangeLog b/ChangeLog
index dbc97b4ef2..804757fbc0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Thu Mar 11 22:12:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
+ logic as GtkEntry when calculating border width. (#116368, reported
+ by Morten Welinder)
+
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
@@ -110,10 +116,10 @@ Thu Mar 11 01:08:25 2004 Jonathan Blandford <jrb@gnome.org>
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
- * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
- on the action view cell renderer here, not in init, so that a) we catch
- style changes, and b) we get the real style, not the default one.
- Partial fix for #127648, reported by Dave Bordoley.
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the
+ background on the action view cell renderer here, not in init, so
+ that a) we catch style changes, and b) we get the real style, not
+ the default one. Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index dbc97b4ef2..804757fbc0 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,9 @@
+Thu Mar 11 22:12:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
+ logic as GtkEntry when calculating border width. (#116368, reported
+ by Morten Welinder)
+
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
@@ -110,10 +116,10 @@ Thu Mar 11 01:08:25 2004 Jonathan Blandford <jrb@gnome.org>
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
- * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
- on the action view cell renderer here, not in init, so that a) we catch
- style changes, and b) we get the real style, not the default one.
- Partial fix for #127648, reported by Dave Bordoley.
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the
+ background on the action view cell renderer here, not in init, so
+ that a) we catch style changes, and b) we get the real style, not
+ the default one. Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index dbc97b4ef2..804757fbc0 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,9 @@
+Thu Mar 11 22:12:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
+ logic as GtkEntry when calculating border width. (#116368, reported
+ by Morten Welinder)
+
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
@@ -110,10 +116,10 @@ Thu Mar 11 01:08:25 2004 Jonathan Blandford <jrb@gnome.org>
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
- * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
- on the action view cell renderer here, not in init, so that a) we catch
- style changes, and b) we get the real style, not the default one.
- Partial fix for #127648, reported by Dave Bordoley.
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the
+ background on the action view cell renderer here, not in init, so
+ that a) we catch style changes, and b) we get the real style, not
+ the default one. Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index dbc97b4ef2..804757fbc0 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,9 @@
+Thu Mar 11 22:12:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
+ logic as GtkEntry when calculating border width. (#116368, reported
+ by Morten Welinder)
+
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
@@ -110,10 +116,10 @@ Thu Mar 11 01:08:25 2004 Jonathan Blandford <jrb@gnome.org>
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
- * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
- on the action view cell renderer here, not in init, so that a) we catch
- style changes, and b) we get the real style, not the default one.
- Partial fix for #127648, reported by Dave Bordoley.
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the
+ background on the action view cell renderer here, not in init, so
+ that a) we catch style changes, and b) we get the real style, not
+ the default one. Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index dbc97b4ef2..804757fbc0 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,9 @@
+Thu Mar 11 22:12:14 2004 Matthias Clasen <maclas@gmx.de>
+
+ * gtk/gtkspinbutton.c (gtk_spin_button_size_request): Use the same
+ logic as GtkEntry when calculating border width. (#116368, reported
+ by Morten Welinder)
+
Thu Mar 11 15:59:05 2004 Owen Taylor <otaylor@redhat.com>
* tests/testgtk.c (create_spins): Use gtk_entry_set_width_chars()
@@ -110,10 +116,10 @@ Thu Mar 11 01:08:25 2004 Jonathan Blandford <jrb@gnome.org>
Wed Mar 10 23:40:15 2004 Matthias Clasen <maclas@gmx.de>
- * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the background
- on the action view cell renderer here, not in init, so that a) we catch
- style changes, and b) we get the real style, not the default one.
- Partial fix for #127648, reported by Dave Bordoley.
+ * gtk/gtkentrycompletion.c (_gtk_entry_completion_popup): Set the
+ background on the action view cell renderer here, not in init, so
+ that a) we catch style changes, and b) we get the real style, not
+ the default one. Partial fix for #127648, reported by Dave Bordoley.
2004-03-10 Tor Lillqvist <tml@iki.fi>
diff --git a/gtk/gtkspinbutton.c b/gtk/gtkspinbutton.c
index 7a65b5b028..1c4c30924b 100644
--- a/gtk/gtkspinbutton.c
+++ b/gtk/gtkspinbutton.c
@@ -616,6 +616,40 @@ compute_double_length (double val, int digits)
return a + digits + extra;
}
+/* Keep in sync with gtkentry.c !
+ */
+static void
+get_borders (GtkEntry *entry,
+ gint *xborder,
+ gint *yborder)
+{
+ GtkWidget *widget = GTK_WIDGET (entry);
+ gint focus_width;
+ gboolean interior_focus;
+
+ gtk_widget_style_get (widget,
+ "interior-focus", &interior_focus,
+ "focus-line-width", &focus_width,
+ NULL);
+
+ if (entry->has_frame)
+ {
+ *xborder = widget->style->xthickness;
+ *yborder = widget->style->ythickness;
+ }
+ else
+ {
+ *xborder = 0;
+ *yborder = 0;
+ }
+
+ if (!interior_focus)
+ {
+ *xborder += focus_width;
+ *yborder += focus_width;
+ }
+}
+
static void
gtk_spin_button_size_request (GtkWidget *widget,
GtkRequisition *requisition)
@@ -641,6 +675,7 @@ gtk_spin_button_size_request (GtkWidget *widget,
gint digit_width;
gboolean interior_focus;
gint focus_width;
+ gint xborder, yborder;
gtk_widget_style_get (widget,
"interior-focus", &interior_focus,
@@ -673,9 +708,11 @@ gtk_spin_button_size_request (GtkWidget *widget,
w = PANGO_PIXELS (MIN (string_len, max_string_len) * digit_width);
width = MAX (width, w);
- requisition->width = width + /* INNER_BORDER */ 2 * 2;
- if (!interior_focus)
- requisition->width += 2 * focus_width;
+ get_borders (entry, &xborder, &yborder);
+
+ xborder += 2; /* INNER_BORDER */
+
+ requisition->width = width + xborder * 2;
}
requisition->width += arrow_size + 2 * widget->style->xthickness;