summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Taylor <otaylor@gtk.org>1998-05-23 21:55:40 +0000
committerOwen Taylor <otaylor@src.gnome.org>1998-05-23 21:55:40 +0000
commit53d06396b835233d87a06ebd7f86418b5418f19c (patch)
tree2b9b8335db1be65f1f493063f5323dc32ede8092
parentfdd65ddef39ad98af0bf5814662a405f46abd77b (diff)
downloadgtk+-53d06396b835233d87a06ebd7f86418b5418f19c.tar.gz
Locate child at (border_width,border_width), not
Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org> * gtk/gtkeventbox.c (gtk_event_box_size_allocate): Locate child at (border_width,border_width), not (2*border_width,2*border_width). [ The border is _outside_ widget->window ] * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
-rw-r--r--ChangeLog10
-rw-r--r--ChangeLog.pre-2-010
-rw-r--r--ChangeLog.pre-2-1010
-rw-r--r--ChangeLog.pre-2-210
-rw-r--r--ChangeLog.pre-2-410
-rw-r--r--ChangeLog.pre-2-610
-rw-r--r--ChangeLog.pre-2-810
-rw-r--r--gdk/gdk.c50
-rw-r--r--gdk/gdk.h3
-rw-r--r--gdk/x11/gdkmain-x11.c50
-rw-r--r--gtk/gtkeventbox.c4
11 files changed, 175 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-0
+++ b/ChangeLog.pre-2-0
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-2
+++ b/ChangeLog.pre-2-2
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-4
+++ b/ChangeLog.pre-2-4
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 978d0b01b2..9522faa1c3 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,13 @@
+Sat May 23 17:48:58 1998 Owen Taylor <otaylor@gtk.org>
+
+ * gtk/gtkeventbox.c (gtk_event_box_size_allocate):
+ Locate child at (border_width,border_width), not
+ (2*border_width,2*border_width). [ The border is _outside_
+ widget->window ]
+
+ * gdk/gdk.[ch]: added gdk_screen_width_mm/gdk_screen_height_mm
+ functions. [From: Alexander Larsson <alla@lysator.liu.se> ]
+
1998-05-22 Miguel de Icaza <miguel@nuclecu.unam.mx>
* gtk/gtkfeatures.h.in: Define GTK_HAVE_RC_SET_IMAGE_LOADER, to be
diff --git a/gdk/gdk.c b/gdk/gdk.c
index c1b7073b67..78d979514e 100644
--- a/gdk/gdk.c
+++ b/gdk/gdk.c
@@ -1497,6 +1497,56 @@ gdk_screen_height (void)
return return_val;
}
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_width_mm
+ *
+ * Return the width of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_width_mm (void)
+{
+ gint return_val;
+
+ return_val = DisplayWidthMM (gdk_display, gdk_screen);
+
+ return return_val;
+}
+
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_height
+ *
+ * Return the height of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_height_mm (void)
+{
+ gint return_val;
+
+ return_val = DisplayHeightMM (gdk_display, gdk_screen);
+
+ return return_val;
+}
+
void
gdk_key_repeat_disable (void)
{
diff --git a/gdk/gdk.h b/gdk/gdk.h
index e80c838b98..e9dbf5718f 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -86,6 +86,9 @@ gint gdk_pointer_is_grabbed (void);
gint gdk_screen_width (void);
gint gdk_screen_height (void);
+gint gdk_screen_width_mm (void);
+gint gdk_screen_height_mm (void);
+
void gdk_flush (void);
void gdk_beep (void);
diff --git a/gdk/x11/gdkmain-x11.c b/gdk/x11/gdkmain-x11.c
index c1b7073b67..78d979514e 100644
--- a/gdk/x11/gdkmain-x11.c
+++ b/gdk/x11/gdkmain-x11.c
@@ -1497,6 +1497,56 @@ gdk_screen_height (void)
return return_val;
}
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_width_mm
+ *
+ * Return the width of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_width_mm (void)
+{
+ gint return_val;
+
+ return_val = DisplayWidthMM (gdk_display, gdk_screen);
+
+ return return_val;
+}
+
+/*
+ *--------------------------------------------------------------
+ * gdk_screen_height
+ *
+ * Return the height of the screen in millimeters.
+ *
+ * Arguments:
+ *
+ * Results:
+ *
+ * Side effects:
+ *
+ *--------------------------------------------------------------
+ */
+
+gint
+gdk_screen_height_mm (void)
+{
+ gint return_val;
+
+ return_val = DisplayHeightMM (gdk_display, gdk_screen);
+
+ return return_val;
+}
+
void
gdk_key_repeat_disable (void)
{
diff --git a/gtk/gtkeventbox.c b/gtk/gtkeventbox.c
index d6d699d9ff..9c3fbc1031 100644
--- a/gtk/gtkeventbox.c
+++ b/gtk/gtkeventbox.c
@@ -161,8 +161,8 @@ gtk_event_box_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
bin = GTK_BIN (widget);
- child_allocation.x = GTK_CONTAINER (widget)->border_width;
- child_allocation.y = GTK_CONTAINER (widget)->border_width;
+ child_allocation.x = 0;
+ child_allocation.y = 0;
child_allocation.width = MAX (allocation->width - GTK_CONTAINER (widget)->border_width * 2, 0);
child_allocation.height = MAX (allocation->height - GTK_CONTAINER (widget)->border_width * 2, 0);